version 1.17, 1999/12/15 05:33:06 |
version 1.18, 2000/01/21 04:22:54 |
|
|
panic("Cannot reopen atjob file"); |
panic("Cannot reopen atjob file"); |
|
|
/* |
/* |
* Get the userid to mail to, first by trying getlogin(), which reads |
* Get the userid to mail to, first by trying getlogin(), which asks |
* /etc/utmp, then from $LOGNAME or $USER, finally from getpwuid(). |
* the kernel, then from $LOGNAME or $USER, finally from getpwuid(). |
*/ |
*/ |
mailname = getlogin(); |
mailname = getlogin(); |
if (mailname == NULL && (mailname = getenv("LOGNAME")) == NULL) |
if (mailname == NULL && (mailname = getenv("LOGNAME")) == NULL) |
|
|
* Cd to the directory at the time and write out all the |
* Cd to the directory at the time and write out all the |
* commands the user supplies from stdin. |
* commands the user supplies from stdin. |
*/ |
*/ |
|
if ((ap = cwdname()) == NULL) |
|
perr("Cannot get current working directory"); |
(void)fputs("cd ", fp); |
(void)fputs("cd ", fp); |
for (ap = cwdname(); *ap != '\0'; ap++) { |
for (; *ap != '\0'; ap++) { |
if (*ap == '\n') |
if (*ap == '\n') |
fprintf(fp, "\"\n\""); |
fprintf(fp, "\"\n\""); |
else { |
else { |