mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
Added check for failed fork() system call
This commit is contained in:
parent
90ddf8e40f
commit
c77afd9583
@ -1076,10 +1076,23 @@ rem_port* INET_connect(const TEXT* name,
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef WIN_NT
|
||||
if (flag & SRVR_debug)
|
||||
#else
|
||||
if ((flag & SRVR_debug) || !fork())
|
||||
int pid = 0;
|
||||
if (!(flag & SRVR_debug))
|
||||
{
|
||||
pid = fork();
|
||||
if (pid < 0)
|
||||
{
|
||||
inet_error(port, "fork", isc_net_connect_err, inetErrNo);
|
||||
disconnect(port);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!pid)
|
||||
#endif
|
||||
{
|
||||
SOCLOSE(port->port_handle);
|
||||
|
Loading…
Reference in New Issue
Block a user