mirror of
https://github.com/samba-team/samba.git
synced 2025-07-29 15:42:04 +03:00
Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid. Jeremy.
This commit is contained in:
@ -101,7 +101,7 @@ void pidfile_create(char *name)
|
||||
}
|
||||
|
||||
memset(buf, 0, sizeof(buf));
|
||||
slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) getpid());
|
||||
slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) sys_getpid());
|
||||
if (write(fd, buf, sizeof(buf)) != sizeof(buf)) {
|
||||
DEBUG(0,("ERROR: can't write to file %s: %s\n",
|
||||
pidFile, strerror(errno)));
|
||||
|
Reference in New Issue
Block a user