Use POSIX functions instead of legacy ones:
getwd() -> getcwd() wait3() -> waitpid()
This commit is contained in:
+2
-2
@@ -2553,7 +2553,7 @@ pwd(void)
|
|||||||
{
|
{
|
||||||
char *s, path[MAXPATHLEN + 1];
|
char *s, path[MAXPATHLEN + 1];
|
||||||
|
|
||||||
if (getwd(path) == NULL)
|
if (getcwd(path, sizeof(path)) == NULL)
|
||||||
reply(550, "%s.", path);
|
reply(550, "%s.", path);
|
||||||
else {
|
else {
|
||||||
if ((s = doublequote(path)) == NULL)
|
if ((s = doublequote(path)) == NULL)
|
||||||
@@ -3130,7 +3130,7 @@ send_file_list(char *whichf)
|
|||||||
void
|
void
|
||||||
reapchild(int signo)
|
reapchild(int signo)
|
||||||
{
|
{
|
||||||
while (wait3(NULL, WNOHANG, NULL) > 0);
|
while (waitpid(-1, NULL, WNOHANG) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OLD_SETPROCTITLE
|
#ifdef OLD_SETPROCTITLE
|
||||||
|
|||||||
Reference in New Issue
Block a user