Mercurial > hg > toybox
comparison toys/posix/nohup.c @ 1183:0752b2d58909 draft
Rename xmsprintf() to just xmprintf().
Partly because there's no supplied target string ala sprintf, and partly
because I can never remember what order the m and s go in.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 16 Jan 2014 09:26:50 -0600 |
parents | 144d5ba7d410 |
children | 76965793e8f4 |
comparison
equal
deleted
inserted
replaced
1182:7079ea384a2e | 1183:0752b2d58909 |
---|---|
26 close(1); | 26 close(1); |
27 if (-1 == open("nohup.out", O_CREAT|O_APPEND|O_WRONLY, | 27 if (-1 == open("nohup.out", O_CREAT|O_APPEND|O_WRONLY, |
28 S_IRUSR|S_IWUSR )) | 28 S_IRUSR|S_IWUSR )) |
29 { | 29 { |
30 char *temp = getenv("HOME"); | 30 char *temp = getenv("HOME"); |
31 temp = xmsprintf("%s/%s", temp ? temp : "", "nohup.out"); | 31 temp = xmprintf("%s/%s", temp ? temp : "", "nohup.out"); |
32 xcreate(temp, O_CREAT|O_APPEND|O_WRONLY, S_IRUSR|S_IWUSR); | 32 xcreate(temp, O_CREAT|O_APPEND|O_WRONLY, S_IRUSR|S_IWUSR); |
33 } | 33 } |
34 } | 34 } |
35 if (isatty(0)) { | 35 if (isatty(0)) { |
36 close(0); | 36 close(0); |