summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-11-17 22:43:46 +0000
committeryar <yar@FreeBSD.org>2004-11-17 22:43:46 +0000
commit95ee012f23871ee0e9ec3979f7cd31fa33cd7e3c (patch)
treee118b1e7ead3c643b41b11a636d767180923ea91
parent46a44c81e19ac2f015e41e385d4bc63ae600ce0b (diff)
downloadFreeBSD-src-95ee012f23871ee0e9ec3979f7cd31fa33cd7e3c.zip
FreeBSD-src-95ee012f23871ee0e9ec3979f7cd31fa33cd7e3c.tar.gz
Use POSIX functions instead of legacy ones:
getwd() -> getcwd() wait3() -> waitpid()
-rw-r--r--libexec/ftpd/ftpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index a50dabd..106b065 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -2553,7 +2553,7 @@ pwd(void)
{
char *s, path[MAXPATHLEN + 1];
- if (getwd(path) == NULL)
+ if (getcwd(path, sizeof(path)) == NULL)
reply(550, "%s.", path);
else {
if ((s = doublequote(path)) == NULL)
@@ -3130,7 +3130,7 @@ out:
void
reapchild(int signo)
{
- while (wait3(NULL, WNOHANG, NULL) > 0);
+ while (waitpid(-1, NULL, WNOHANG) > 0);
}
#ifdef OLD_SETPROCTITLE
OpenPOWER on IntegriCloud