diff options
author | Jeremy Allison <jra@samba.org> | 2000-05-02 02:23:41 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-05-02 02:23:41 +0000 |
commit | 693ffb8466ada58ecc59fde754ba79fc6f51528d (patch) | |
tree | 639fae54b3d874aae78e5732aef20f52de5b60bf /source3/nmbd/nmbd_winsserver.c | |
parent | 830a9e571eee5330097376e94af7dc0f2d5f2f02 (diff) | |
download | samba-693ffb8466ada58ecc59fde754ba79fc6f51528d.tar.gz samba-693ffb8466ada58ecc59fde754ba79fc6f51528d.tar.bz2 samba-693ffb8466ada58ecc59fde754ba79fc6f51528d.zip |
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 used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
Diffstat (limited to 'source3/nmbd/nmbd_winsserver.c')
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index 2b99a8ce53..33b33040cb 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -1592,14 +1592,14 @@ void wins_write_database(BOOL background) doesn't block while this is done */ if (background) { CatchChild(); - if (fork()) { + if (sys_fork()) { return; } } slprintf(fname,sizeof(fname),"%s/%s", lp_lockdir(), WINS_LIST); all_string_sub(fname,"//", "/", 0); - slprintf(fnamenew,sizeof(fnamenew),"%s.%u", fname, (unsigned int)getpid()); + slprintf(fnamenew,sizeof(fnamenew),"%s.%u", fname, (unsigned int)sys_getpid()); if((fp = sys_fopen(fnamenew,"w")) == NULL) { |