diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-02-24 02:25:21 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-02-24 02:25:21 +0800 |
commit | fab6b7c672366015ca996d094f9e3509e2e2ac4a (patch) | |
tree | 724203a7534258e9aad030e8a19e2567d013d2b4 | |
parent | c120944e67d5f657c3adb1fc1e97a39466aa1473 (diff) | |
download | pttbbs-fab6b7c672366015ca996d094f9e3509e2e2ac4a.tar pttbbs-fab6b7c672366015ca996d094f9e3509e2e2ac4a.tar.gz pttbbs-fab6b7c672366015ca996d094f9e3509e2e2ac4a.tar.bz2 pttbbs-fab6b7c672366015ca996d094f9e3509e2e2ac4a.tar.lz pttbbs-fab6b7c672366015ca996d094f9e3509e2e2ac4a.tar.xz pttbbs-fab6b7c672366015ca996d094f9e3509e2e2ac4a.tar.zst pttbbs-fab6b7c672366015ca996d094f9e3509e2e2ac4a.zip |
make valgrind happy
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2526 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | util/shmctl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/shmctl.c b/util/shmctl.c index 3801be65..2933006d 100644 --- a/util/shmctl.c +++ b/util/shmctl.c @@ -124,11 +124,15 @@ int utmpfix(int argc, char **argv) sleep(1); break; case 0: +#ifndef VALGRIND setproctitle("utmpfix"); +#endif goto DoUtmpfix; default: +#ifndef VALGRIND setproctitle(daemonsleep ? "utmpfixd(wait for %d)" : "utmpfix(wait for %d)", (int)pid); +#endif waitpid(pid, &status, 0); if( WIFEXITED(status) && !daemonsleep ) return 0; @@ -451,7 +455,9 @@ int utmpsortd(int argc, char **argv) return 0; } +#ifndef VALGRIND setproctitle("shmctl utmpsortd"); +#endif if( argc < 2 || (interval = atoi(argv[1])) < 500000 ) interval = 1000000; // default to 1 sec sortall = ((argc < 3) ? 1 : atoi(argv[2])); @@ -625,7 +631,9 @@ int timed(int argc, char **argv) perror("fork()"); if( pid != 0 ) return 0; +#ifndef VALGRIND setproctitle("shmctl timed"); +#endif while( 1 ){ SHM->GV2.e.now = time(NULL); sleep(1); @@ -688,7 +696,9 @@ int nkwbd(int argc, char **argv) return 0; } +#ifndef VALGRIND setproctitle("shmctl nkwbd(sleep%d,timeout%d)", sleeptime, timeout); +#endif switch( fork() ){ case -1: |