_PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout)
{
if (do_fork) {
- if (sys_fork()) {
+ if (fork()) {
_exit(0);
}
}
counter++;
DEBUGSEP(0);
- DEBUG(0,("INTERNAL ERROR: Signal %d in pid %d (%s)",sig,(int)sys_getpid(),SAMBA_VERSION_STRING));
+ DEBUG(0,("INTERNAL ERROR: Signal %d in pid %d (%s)",sig,(int)getpid(),SAMBA_VERSION_STRING));
DEBUG(0,("\nPlease read the Trouble-Shooting section of the Samba HOWTO\n"));
DEBUGSEP(0);
**/
void CatchChildLeaveStatus(void);
-/**
- * Wrapper for fork used to invalid pid cache.
- **/
-_PUBLIC_ pid_t sys_fork(void);
-
-/**
- * Wrapper for getpid. Ensures we only do a system call *once*.
- **/
-_PUBLIC_ pid_t sys_getpid(void);
-
struct sockaddr;
_PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa,
*/
-/**************************************************************************
- Wrapper for fork. Ensures we clear our pid cache.
-****************************************************************************/
-
-static pid_t mypid = (pid_t)-1;
-
-_PUBLIC_ pid_t sys_fork(void)
-{
- pid_t forkret = fork();
-
- if (forkret == (pid_t)0) {
- /* Child - reset mypid so sys_getpid does a system call. */
- mypid = (pid_t) -1;
- }
-
- return forkret;
-}
-
-/**************************************************************************
- Wrapper for getpid. Ensures we only do a system call *once*.
-****************************************************************************/
-
-_PUBLIC_ pid_t sys_getpid(void)
-{
- if (mypid == (pid_t)-1)
- mypid = getpid();
-
- return mypid;
-}
-
-
_PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa,
int salen,
char *host,
}
DEBUG(0, ("DCE login succeeded for principal %s on pid %d\n",
- user, sys_getpid()));
+ user, getpid()));
DEBUG(3, ("DCE principal: %s\n"
" uid: %d\n"
dce_error_inq_text(err, dce_errstr, &err2);
DEBUG(0,
("DCE purge login context failed for server instance %d: %s\n",
- sys_getpid(), dce_errstr));
+ getpid(), dce_errstr));
}
}
#endif
rname = talloc_asprintf(ctx,
"%s-%d",
p+1,
- (int)sys_getpid());
+ (int)getpid());
}
if (strequal(lname,"-")) {
rname = talloc_asprintf(ctx,
"stdin-%d",
- (int)sys_getpid());
+ (int)getpid());
}
if (!rname) {
return 1;
**********************************************************************/
#define OUR_HANDLE(hnd) (((hnd)==NULL) ? "NULL" :\
- ( IVAL((hnd)->uuid.node,2) == (uint32)sys_getpid() ? "OURS" : \
+ ( IVAL((hnd)->uuid.node,2) == (uint32)getpid() ? "OURS" : \
"OTHER")), ((unsigned int)IVAL((hnd)->uuid.node,2)),\
- ((unsigned int)sys_getpid() )
+ ((unsigned int)getpid() )
#endif /* _RPC_MISC_H */
return status;
}
- status = register_with_ctdbd(conn, (uint64_t)sys_getpid());
+ status = register_with_ctdbd(conn, (uint64_t)getpid());
if (!NT_STATUS_IS_OK(status)) {
goto fail;
}
}
/* only messages to our pid or the broadcast are valid here */
- if (msg->srvid != sys_getpid() && msg->srvid != MSG_SRVID_SAMBA) {
+ if (msg->srvid != getpid() && msg->srvid != MSG_SRVID_SAMBA) {
DEBUG(0,("Got unexpected message with srvid=%llu\n",
(unsigned long long)msg->srvid));
TALLOC_FREE(buf);
}
memset(buf, 0, sizeof(buf));
- slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) sys_getpid());
+ slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int)getpid());
if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
DEBUG(0,("ERROR: can't write to file %s: %s\n",
pidFile_name, strerror(errno)));
pfp->pool[i].allowed_clients = 1;
pfp->pool[i].started = now;
- pid = sys_fork();
+ pid = fork();
switch (pid) {
case -1:
DEBUG(1, ("Failed to prefork child n. %d !\n", i));
pfp->pool[i].allowed_clients = 1;
pfp->pool[i].started = now;
- pid = sys_fork();
+ pid = fork();
switch (pid) {
case -1:
DEBUG(1, ("Failed to prefork child n. %d !\n", j));
ldap_state->last_ping = time_mono(NULL);
- ldap_state->pid = sys_getpid();
+ ldap_state->pid = getpid();
TALLOC_FREE(ldap_state->idle_event);
alarm(absolute_endtime - now);
}
- if (ldap_state->pid != sys_getpid()) {
+ if (ldap_state->pid != getpid()) {
smbldap_close(ldap_state);
}
}
CatchChildLeaveStatus();
- if ((pid=sys_fork()) < 0) {
+ if ((pid=fork()) < 0) {
DEBUG(0,("smbrun: fork failed with error %s\n", strerror(errno) ));
CatchChild();
if (outfd) {
CatchChildLeaveStatus();
- if ((pid=sys_fork()) < 0) {
+ if ((pid=fork()) < 0) {
DEBUG(0, ("smbrunsecret: fork failed with error %s\n", strerror(errno)));
CatchChild();
return errno;
get_remote_arch_str());
break;
case 'd' :
- slprintf(pidstr,sizeof(pidstr)-1, "%d",(int)sys_getpid());
+ slprintf(pidstr,sizeof(pidstr)-1, "%d",(int)getpid());
a_string = realloc_string_sub(a_string, "%d", pidstr);
break;
case 'h' :
if(!(argl = extract_args(NULL, command)))
goto err_exit;
- entry->child_pid = sys_fork();
+ entry->child_pid = fork();
if (entry->child_pid == -1) {
goto err_exit;
* just let the child panic. we catch the signal. */
DEBUG(10, ("tdb_validate: forking to let child do validation.\n"));
- child_pid = sys_fork();
+ child_pid = fork();
if (child_pid == 0) {
/* child code */
DEBUG(10, ("tdb_validate (validation child): created\n"));
int result;
DEBUG(0,("PANIC (pid %llu): %s\n",
- (unsigned long long)sys_getpid(), why));
+ (unsigned long long)getpid(), why));
log_stack_trace();
#if defined(HAVE_PRCTL) && defined(PR_SET_PTRACER)
void set_my_vnn(uint32 vnn)
{
- DEBUG(10, ("vnn pid %d = %u\n", (int)sys_getpid(), (unsigned int)vnn));
+ DEBUG(10, ("vnn pid %d = %u\n", (int)getpid(), (unsigned int)vnn));
my_vnn = vnn;
}
struct server_id procid_self(void)
{
- return pid_to_procid(sys_getpid());
+ return pid_to_procid(getpid());
}
bool procid_equal(const struct server_id *p1, const struct server_id *p2)
bool procid_is_me(const struct server_id *pid)
{
- if (pid->pid != sys_getpid())
+ if (pid->pid != getpid())
return False;
if (pid->task_id != 0)
return False;
goto error;
}
- cli->smb1.pid = (uint16_t)sys_getpid();
+ cli->smb1.pid = (uint16_t)getpid();
cli->smb1.vc_num = cli->smb1.pid;
cli->smb1.tid = UINT16_MAX;
cli->smb1.uid = UID_FIELD_INVALID;
* Hmmm, I want to get hostname as well, but I am too
* lazy for the moment
*/
- pid = sys_getpid();
+ pid = getpid();
netbios_name = (char *)SMB_MALLOC(17);
if (!netbios_name) {
errno = ENOMEM;
goto fail;
}
- result->pid = sys_fork();
+ result->pid = fork();
if (result->pid == -1) {
status = map_nt_error_from_unix(errno);
DEBUG(0, ("fork failed: %s\n", strerror(errno)));
setenv("GAM_CLIENT_ID","SAMBA",0);
#endif
- if (asprintf(&name, "smbd (%lu)", (unsigned long)sys_getpid()) == -1) {
+ if (asprintf(&name, "smbd (%lu)", (unsigned long)getpid()) == -1) {
DEBUG(0, ("No memory\n"));
return NT_STATUS_NO_MEMORY;
}
return status;
}
- h->pid = sys_fork();
+ h->pid = fork();
if (h->pid == -1) {
return map_nt_error_from_unix(errno);
return;
}
- child_pid = sys_fork();
+ child_pid = fork();
if (child_pid) {
fd_in = fd1[0];
StartupTime = time(NULL);
- sys_srandom(time(NULL) ^ sys_getpid());
+ sys_srandom(time(NULL) ^ getpid());
if (!override_logfile) {
char *lfile = NULL;
static uint16 generate_name_trn_id(void)
{
if (!name_trn_id) {
- name_trn_id = ((unsigned)time(NULL)%(unsigned)0x7FFF) + ((unsigned)sys_getpid()%(unsigned)100);
+ name_trn_id = ((unsigned)time(NULL)%(unsigned)0x7FFF) + ((unsigned)getpid()%(unsigned)100);
}
name_trn_id = (name_trn_id+1) % (unsigned)0x7FFF;
return name_trn_id;
/* the parent forks and returns, leaving the child to do the
actual sync and call END_PROFILE*/
CatchChild();
- if ((s->pid = sys_fork())) return;
+ if ((s->pid = fork())) return;
BlockSignals( False, SIGTERM );
/* We will do the writing in a child process to ensure that the parent doesn't block while this is done */
if (background) {
CatchChild();
- if (sys_fork()) {
+ if (fork()) {
return;
}
if (tdb_reopen(wins_tdb)) {
/* This is safe as the 0 length means "don't expand". */
all_string_sub(fname,"//", "/", 0);
- if (asprintf(&fnamenew, "%s.%u", fname, (unsigned int)sys_getpid()) < 0) {
+ if (asprintf(&fnamenew, "%s.%u", fname, (unsigned int)getpid()) < 0) {
goto err_exit;
}
pfile2 = talloc_asprintf(talloc_tos(),
"%s.%u",
- pfile, (unsigned)sys_getpid());
+ pfile, (unsigned)getpid());
if (!pfile2) {
return false;
}
*/
static void get_rand_seed(void *userdata, int *new_seed)
{
- *new_seed = sys_getpid();
+ *new_seed = getpid();
if (db_ctx) {
dbwrap_trans_change_int32_atomic(db_ctx, "INFO/random_seed",
new_seed, 1);
return false;
}
- pid = sys_fork();
+ pid = fork();
if (pid == (pid_t)-1) {
DEBUG(10,("cups_pcap_load_async: fork failed %s\n",
strerror(errno) ));
fstring keystr;
TDB_DATA key;
TDB_DATA data;
- pid_t updating_pid = sys_getpid();
+ pid_t updating_pid = getpid();
uint8 buffer[4];
struct tdb_print_db *pdb = get_print_db_byname(sharename);
struct tdb_print_db *pdb = NULL;
TDB_CONTEXT *tdb = NULL;
const char *printername;
- uint32 mypid = (uint32)sys_getpid();
+ uint32_t mypid = (uint32_t)getpid();
bool ret = False;
size_t i;
struct tdb_print_db *pdb = NULL;
TDB_CONTEXT *tdb = NULL;
const char *printername;
- uint32 mypid = (uint32)sys_getpid();
+ uint32_t mypid = (uint32_t)getpid();
size_t i;
bool ret = False;
char *print_job_fname(const char* sharename, uint32 jobid)
{
struct printjob *pjob = print_job_find(sharename, jobid);
- if (!pjob || pjob->spooled || pjob->pid != sys_getpid())
+ if (!pjob || pjob->spooled || pjob->pid != getpid())
return NULL;
return pjob->filename;
}
struct printjob *pjob;
pjob = print_job_find(sharename, jobid);
- if (!pjob || pjob->pid != sys_getpid())
+ if (!pjob || pjob->pid != getpid())
return False;
fstrcpy(pjob->jobname, name);
struct printjob *pjob;
pjob = print_job_find(sharename, jobid);
- if (!pjob || pjob->pid != sys_getpid()) {
+ if (!pjob || pjob->pid != getpid()) {
return false;
}
if (!pjob)
return -1;
/* don't allow another process to get this info - it is meaningless */
- if (pjob->pid != sys_getpid())
+ if (pjob->pid != getpid())
return -1;
/* if SMBD is spooling this can't be allowed */
ZERO_STRUCT(pjob);
- pjob.pid = sys_getpid();
+ pjob.pid = getpid();
pjob.sysjob = -1;
pjob.fd = -1;
pjob.starttime = time(NULL);
if (!pjob)
return;
/* don't allow another process to get this info - it is meaningless */
- if (pjob->pid != sys_getpid())
+ if (pjob->pid != getpid())
return;
pjob->page_count++;
return NT_STATUS_PRINT_CANCELLED;
}
- if (pjob->spooled || pjob->pid != sys_getpid()) {
+ if (pjob->spooled || pjob->pid != getpid()) {
return NT_STATUS_ACCESS_DENIED;
}
for( i = 0; i < data.dsize; i += 8) {
pid_t pid = (pid_t)IVAL(data.dptr, i);
- if (pid == sys_getpid())
+ if (pid == getpid())
continue;
/* Entry is dead if process doesn't exist or refcount is zero. */
BlockSignals(true, SIGTERM);
BlockSignals(true, SIGHUP);
- pid = sys_fork();
+ pid = fork();
/* parent or error */
if (pid != 0) {
BlockSignals(true, SIGTERM);
BlockSignals(true, SIGHUP);
- pid = sys_fork();
+ pid = fork();
if (pid == -1) {
DEBUG(0, ("Failed to fork SPOOLSS [%s]\n",
DEBUG(1, ("Forking Endpoint Mapper Daemon\n"));
- pid = sys_fork();
+ pid = fork();
if (pid == -1) {
DEBUG(0, ("Failed to fork Endpoint Mapper [%s], aborting ...\n",
BlockSignals(true, SIGTERM);
BlockSignals(true, SIGHUP);
- pid = sys_fork();
+ pid = fork();
if (pid == -1) {
DEBUG(0, ("Failed to fork LSASD [%s], aborting ...\n",
strerror(errno)));
/* something random */
SSVAL(rpc_hnd->wire_handle.uuid.node, 0, t);
/* something more random */
- SIVAL(rpc_hnd->wire_handle.uuid.node, 2, sys_getpid());
+ SIVAL(rpc_hnd->wire_handle.uuid.node, 2, getpid());
DLIST_ADD(p->pipe_handles->handles, rpc_hnd);
p->pipe_handles->count++;
CatchChildLeaveStatus();
- if ((pid = sys_fork()) < 0) {
+ if ((pid = fork()) < 0) {
DEBUG(3, ("chat_with_program: Cannot fork() child for password change: %s\n", pass->pw_name));
SAFE_FREE(slavedev);
close(master);
/* Get the status of the service.. */
info->ops->service_status( info->name, &svc_stat_proc.status );
- svc_stat_proc.process_id = sys_getpid();
+ svc_stat_proc.process_id = getpid();
svc_stat_proc.service_flags = 0x0;
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, &svc_stat_proc,
increases the chance that the errant client will get an error rather
than causing corruption */
if (sconn->first_file == 0) {
- sconn->first_file = (sys_getpid() ^ (int)time(NULL));
+ sconn->first_file = (getpid() ^ (int)time(NULL));
sconn->first_file %= sconn->real_max_open_files;
}
set_Protocol(PROTOCOL_LANMAN1);
/* Reply, SMBlockread, SMBwritelock supported. */
- SCVAL(req->outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
- SSVAL(req->outbuf,smb_vwv2,sconn->smb1.negprot.max_recv);
- SSVAL(req->outbuf,smb_vwv3,lp_maxmux()); /* maxmux */
- SSVAL(req->outbuf,smb_vwv4,1);
- SSVAL(req->outbuf,smb_vwv5,raw); /* tell redirector we support
+ SCVAL(req->outbuf,smb_flg, FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
+ SSVAL(req->outbuf,smb_vwv2, sconn->smb1.negprot.max_recv);
+ SSVAL(req->outbuf,smb_vwv3, lp_maxmux()); /* maxmux */
+ SSVAL(req->outbuf,smb_vwv4, 1);
+ SSVAL(req->outbuf,smb_vwv5, raw); /* tell redirector we support
readbraw writebraw (possibly) */
- SIVAL(req->outbuf,smb_vwv6,sys_getpid());
+ SIVAL(req->outbuf,smb_vwv6, getpid());
SSVAL(req->outbuf,smb_vwv10, set_server_zone_offset(t)/60);
srv_put_dos_date((char *)req->outbuf,smb_vwv8,t);
reply_outbuf(req, 13, sconn->smb1.negprot.encrypted_passwords?8:0);
- SSVAL(req->outbuf,smb_vwv0,choice);
- SSVAL(req->outbuf,smb_vwv1,secword);
- SIVAL(req->outbuf,smb_vwv6,sys_getpid());
+ SSVAL(req->outbuf,smb_vwv0, choice);
+ SSVAL(req->outbuf,smb_vwv1, secword);
+ SIVAL(req->outbuf,smb_vwv6, getpid());
/* Create a token value and add it to the outgoing packet. */
if (sconn->smb1.negprot.encrypted_passwords) {
set_Protocol(PROTOCOL_NT1);
- SSVAL(req->outbuf,smb_vwv1+1,lp_maxmux()); /* maxmpx */
- SSVAL(req->outbuf,smb_vwv2+1,1); /* num vcs */
+ SSVAL(req->outbuf,smb_vwv1+1, lp_maxmux()); /* maxmpx */
+ SSVAL(req->outbuf,smb_vwv2+1, 1); /* num vcs */
SIVAL(req->outbuf,smb_vwv3+1,
sconn->smb1.negprot.max_recv); /* max buffer. LOTS! */
- SIVAL(req->outbuf,smb_vwv5+1,0x10000); /* raw size. full 64k */
- SIVAL(req->outbuf,smb_vwv7+1,sys_getpid()); /* session key */
- SIVAL(req->outbuf,smb_vwv9+1,capabilities); /* capabilities */
+ SIVAL(req->outbuf,smb_vwv5+1, 0x10000); /* raw size. full 64k */
+ SIVAL(req->outbuf,smb_vwv7+1, getpid()); /* session key */
+ SIVAL(req->outbuf,smb_vwv9+1, capabilities); /* capabilities */
clock_gettime(CLOCK_REALTIME,&ts);
put_long_date_timespec(TIMESTAMP_SET_NT_OR_BETTER,(char *)req->outbuf+smb_vwv11+1,ts);
SSVALS(req->outbuf,smb_vwv15+1,set_server_zone_offset(ts.tv_sec)/60);
tmpname = talloc_asprintf(ctx,
"%s/koplock.%d",
lp_lockdir(),
- (int)sys_getpid());
+ (int)getpid());
if (!tmpname) {
TALLOC_FREE(ctx);
return False;
return true;
}
- DEBUG(10,("pid[%d] wait for socket lock\n", (int)sys_getpid()));
+ DEBUG(10,("pid[%d] wait for socket lock\n", (int)getpid()));
do {
ok = fcntl_lock(
return false;
}
- DEBUG(10,("pid[%d] got for socket lock\n", (int)sys_getpid()));
+ DEBUG(10,("pid[%d] got for socket lock\n", (int)getpid()));
return true;
}
return false;
}
- DEBUG(10,("pid[%d] unlocked socket\n", (int)sys_getpid()));
+ DEBUG(10,("pid[%d] unlocked socket\n", (int)getpid()));
return true;
}
* client failed.
*/
DEBUG(1,("pid[%d] Error writing %d bytes to client %s. %d. (%s)\n",
- (int)sys_getpid(), (int)len,
+ (int)getpid(), (int)len,
get_peer_addr(sconn->sock, addr, sizeof(addr)),
(int)ret, strerror(errno) ));
conn = req->conn;
DEBUG(3,("switch message %s (pid %d) conn 0x%lx\n", smb_fn_name(type),
- (int)sys_getpid(), (unsigned long)conn));
+ (int)getpid(), (unsigned long)conn));
smb_dump(smb_fn_name(type), 1, (const char *)req->inbuf);
if (!fd_is_readable(sconn->sock)) {
DEBUG(10,("echo_handler[%d] the parent smbd was faster\n",
- (int)sys_getpid()));
+ (int)getpid()));
ok = smbd_unlock_socket_internal(sconn);
if (!ok) {
if (tevent_req_nterror(req, status)) {
tevent_req_nterror(req, status);
DEBUG(1, ("echo_handler[%d]: receive_smb_raw_talloc failed: %s\n",
- (int)sys_getpid(), nt_errstr(status)));
+ (int)getpid(), nt_errstr(status)));
return;
}
DEBUG(1, ("writev to parent failed: %s\n", strerror(err)));
exit(1);
}
- DEBUG(10,("echo_handler[%d]: forwarded pdu to main\n", (int)sys_getpid()));
+ DEBUG(10,("echo_handler[%d]: forwarded pdu to main\n", (int)getpid()));
smbd_echo_activate_writer(state);
}
iov->iov_len = buflen;
DEBUG(10,("echo_handler[%d]: forward to main\n",
- (int)sys_getpid()));
+ (int)getpid()));
smbd_echo_activate_writer(state);
}
goto fail;
}
- child = sys_fork();
+ child = fork();
if (child == 0) {
NTSTATUS status;
listener_pipe[1] = -1;
sconn->smb1.echo_handler.trusted_fd = listener_pipe[0];
- DEBUG(10,("fork_echo_handler: main[%d] echo_child[%d]\n", (int)sys_getpid(), child));
+ DEBUG(10,("fork_echo_handler: main[%d] echo_child[%d]\n", (int)getpid(), child));
/*
* Without smb signing this is the same as the normal smbd
procid_str_static(&src), sig));
#endif
- kill(sys_getpid(), sig);
+ kill(getpid(), sig);
}
#endif /* DEVELOPER */
*/
unique_id = serverid_get_random_unique_id();
- pid = sys_fork();
+ pid = fork();
if (pid == 0) {
NTSTATUS status = NT_STATUS_OK;
}
if (pid < 0) {
- DEBUG(0,("smbd_accept_connection: sys_fork() failed: %s\n",
+ DEBUG(0,("smbd_accept_connection: fork() failed: %s\n",
strerror(errno)));
}
dbgtext( "initially as user %s ",
conn->session_info->unix_info->unix_name );
dbgtext( "(uid=%d, gid=%d) ", (int)effuid, (int)effgid );
- dbgtext( "(pid %d)\n", (int)sys_getpid() );
+ dbgtext( "(pid %d)\n", (int)getpid() );
}
return status;
}
snprintf(sessionid.id_str, sizeof(sessionid.id_str),
- SESSION_TEMPLATE, (long unsigned int)sys_getpid(),
+ SESSION_TEMPLATE, (long unsigned int)getpid(),
vuser->vuid);
}
utmp_strcpy(u->ut_line, id_str, sizeof(u->ut_line));
#if defined(HAVE_UT_UT_PID)
- u->ut_pid = sys_getpid();
+ u->ut_pid = getpid();
#endif
/*
* so we don't block the main winbindd and the validation
* code can safely use fork/waitpid...
*/
- child_pid = sys_fork();
+ child_pid = fork();
if (child_pid == -1) {
DEBUG(1, ("winbind_msg_validate_cache: Could not fork: %s\n",
struct dc_name_ip *dcs = NULL;
int num_dcs = 0;
TALLOC_CTX *mem_ctx = NULL;
- pid_t parent_pid = sys_getpid();
+ pid_t parent_pid = getpid();
char *lfile = NULL;
NTSTATUS status;
domain->dc_probe_pid = (pid_t)-1;
}
- domain->dc_probe_pid = sys_fork();
+ domain->dc_probe_pid = fork();
if (domain->dc_probe_pid == (pid_t)-1) {
DEBUG(0, ("fork_child_dc_connect: Could not fork: %s\n", strerror(errno)));
}
ZERO_STRUCT(state);
- state.pid = sys_getpid();
+ state.pid = getpid();
state.request = &request;
state.response = &response;
- child->pid = sys_fork();
+ child->pid = fork();
if (child->pid == -1) {
DEBUG(0, ("Could not fork: %s\n", strerror(errno)));
/* Child */
child_domain = child->domain;
- DEBUG(10, ("Child process %d\n", (int)sys_getpid()));
+ DEBUG(10, ("Child process %d\n", (int)getpid()));
state.sock = fdpair[0];
close(fdpair[1]);