mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Build fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6053 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
42910b7ae2
commit
7d5a5bcc36
2 changed files with 28 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2000-02-20 Matthias Klose <doko@cs.tu-berlin.de>
|
||||||
|
|
||||||
|
* Tools/gdomap.c (main): Add -I <file> option to write the pid to.
|
||||||
|
|
||||||
Mon Feb 21 13:44:00 2000 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
Mon Feb 21 13:44:00 2000 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
* Source/NSRunLoop.m: Use sel_eq() for selector comparison so that
|
* Source/NSRunLoop.m: Use sel_eq() for selector comparison so that
|
||||||
|
|
|
@ -98,6 +98,7 @@ int debug = 0; /* Extra debug logging. */
|
||||||
int nofork = 0; /* turn off fork() for debugging. */
|
int nofork = 0; /* turn off fork() for debugging. */
|
||||||
int noprobe = 0; /* turn off probe for unknown servers. */
|
int noprobe = 0; /* turn off probe for unknown servers. */
|
||||||
int interval = 600; /* Minimum time (sec) between probes. */
|
int interval = 600; /* Minimum time (sec) between probes. */
|
||||||
|
char *pidfile = NULL; /* file to write PID to */
|
||||||
|
|
||||||
int udp_sent = 0;
|
int udp_sent = 0;
|
||||||
int tcp_sent = 0;
|
int tcp_sent = 0;
|
||||||
|
@ -2859,7 +2860,7 @@ int
|
||||||
main(int argc, char** argv)
|
main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
char *options = "CHL:M:P:R:T:U:a:c:dfi:p";
|
char *options = "CHL:M:P:R:T:U:a:c:dfi:pI:";
|
||||||
int c;
|
int c;
|
||||||
int ptype = GDO_TCP_GDO;
|
int ptype = GDO_TCP_GDO;
|
||||||
int port = 0;
|
int port = 0;
|
||||||
|
@ -2899,6 +2900,7 @@ main(int argc, char** argv)
|
||||||
printf("-f avoid fork() to make debugging easy\n");
|
printf("-f avoid fork() to make debugging easy\n");
|
||||||
printf("-i seconds re-probe at this interval (roughly), min 60\n");
|
printf("-i seconds re-probe at this interval (roughly), min 60\n");
|
||||||
printf("-p obsolete no-op\n");
|
printf("-p obsolete no-op\n");
|
||||||
|
printf("-I pid file to write pid\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
@ -2925,7 +2927,7 @@ main(int argc, char** argv)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(
|
printf(
|
||||||
"A configuration file consists of a list of IP addresses to be probed.\n"
|
"A configuration file consists of a list of IP addresses to be probed.\n"
|
||||||
"The IP addresses shoudl be in standard 'dot' notation, one per line.\n"
|
"The IP addresses should be in standard 'dot' notation, one per line.\n"
|
||||||
"Empty lines are permitted in the configuration file.\n"
|
"Empty lines are permitted in the configuration file.\n"
|
||||||
"Anything on a line after a hash ('#') is ignored.\n"
|
"Anything on a line after a hash ('#') is ignored.\n"
|
||||||
"You tell gdomap about the config file with the '-c' command line option.\n");
|
"You tell gdomap about the config file with the '-c' command line option.\n");
|
||||||
|
@ -3102,7 +3104,11 @@ printf(
|
||||||
fclose(fptr);
|
fclose(fptr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'I':
|
||||||
|
pidfile = optarg;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
debug++;
|
debug++;
|
||||||
break;
|
break;
|
||||||
|
@ -3161,6 +3167,21 @@ printf(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pidfile) {
|
||||||
|
{
|
||||||
|
FILE *fptr = fopen(pidfile, "a");
|
||||||
|
int pid;
|
||||||
|
|
||||||
|
if (fptr == 0)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Unable to open pid file - '%s'\n", pidfile);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
fprintf(fptr, "%d\n", (int) getpid());
|
||||||
|
fclose(fptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ensure we don't have any open file descriptors which may refer
|
* Ensure we don't have any open file descriptors which may refer
|
||||||
* to sockets bound to ports we may try to use.
|
* to sockets bound to ports we may try to use.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue