Fix for OpenBSD
This commit is contained in:
parent
eb92c60896
commit
9b3491740c
@ -221,6 +221,9 @@ int main(int argc, char *argv[])
|
||||
* Find out the name of our parent.
|
||||
*/
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
#if defined(__OpenBSD__)
|
||||
// FIXME: no /proc on OpenBSD
|
||||
#else
|
||||
ppid = getppid();
|
||||
snprintf(temp, PATH_MAX, "/proc/%d/cmdline", ppid);
|
||||
if ((fp = fopen(temp, "r")) == NULL) {
|
||||
@ -237,6 +240,7 @@ int main(int argc, char *argv[])
|
||||
free(parent);
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(args, 0, sizeof(args));
|
||||
|
||||
|
Reference in New Issue
Block a user