summaryrefslogtreecommitdiff
path: root/source3/lib/substitute.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
commit693ffb8466ada58ecc59fde754ba79fc6f51528d (patch)
tree639fae54b3d874aae78e5732aef20f52de5b60bf /source3/lib/substitute.c
parent830a9e571eee5330097376e94af7dc0f2d5f2f02 (diff)
downloadsamba-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/lib/substitute.c')
-rw-r--r--source3/lib/substitute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index c43c133d6a..2a575f0c38 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -176,7 +176,7 @@ void standard_sub_basic(char *str)
case 'T' : string_sub(p,"%T", timestring(False),l); break;
case 'a' : string_sub(p,"%a", remote_arch,l); break;
case 'd' :
- slprintf(pidstr,sizeof(pidstr), "%d",(int)getpid());
+ slprintf(pidstr,sizeof(pidstr), "%d",(int)sys_getpid());
string_sub(p,"%d", pidstr,l);
break;
case 'h' : string_sub(p,"%h", myhostname(),l); break;