aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/nohup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/toys/posix/nohup.c b/toys/posix/nohup.c
index 0cece0b5..df264da2 100644
--- a/toys/posix/nohup.c
+++ b/toys/posix/nohup.c
@@ -28,8 +28,10 @@ void nohup_main(void)
S_IRUSR|S_IWUSR ))
{
char *temp = getenv("HOME");
+
temp = xmprintf("%s/%s", temp ? temp : "", "nohup.out");
xcreate(temp, O_CREAT|O_APPEND|O_WRONLY, 0600);
+ free(temp);
}
}
if (isatty(0)) {