summaryrefslogtreecommitdiffstats
path: root/source/printing/printing.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-05-02 02:23:41 +0000
committerJeremy Allison <jra@samba.org>2000-05-02 02:23:41 +0000
commit148628b616b5c29ba6340d65fc3ddbcabba6e67a (patch)
treef8482fb2dcfa68baeb38a38e2c73ee105abb00a2 /source/printing/printing.c
parent3b25f7368be3877e9ad27498bc9451ec88d4b07f (diff)
downloadsamba-148628b616b5c29ba6340d65fc3ddbcabba6e67a.tar.gz
samba-148628b616b5c29ba6340d65fc3ddbcabba6e67a.tar.xz
samba-148628b616b5c29ba6340d65fc3ddbcabba6e67a.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.
Diffstat (limited to 'source/printing/printing.c')
-rw-r--r--source/printing/printing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/printing/printing.c b/source/printing/printing.c
index 2f36cf2f3f2..95aa50fb431 100644
--- a/source/printing/printing.c
+++ b/source/printing/printing.c
@@ -67,12 +67,12 @@ Does not survive a fork
****************************************************************************/
BOOL print_backend_init(void)
{
- if (tdb && local_pid == getpid()) return True;
+ if (tdb && local_pid == sys_getpid()) return True;
tdb = tdb_open(lock_path("printing.tdb"), 0, 0, O_RDWR|O_CREAT, 0600);
if (!tdb) {
DEBUG(0,("Failed to open printing backend database\n"));
}
- local_pid = getpid();
+ local_pid = sys_getpid();
/* handle a Samba upgrade */
tdb_writelock(tdb);