summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_process.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-04-05 10:26:06 +0200
committerCorinna Vinschen <corinna@vinschen.de>2016-04-05 10:30:28 +0200
commit41abcc5825d33d78bd370997ba664e3c64eb6683 (patch)
tree5d69acdb43f4b1a415e2d870a18ff18675f0c9df /winsup/cygwin/fhandler_process.cc
parent722e363c4de410e67f24d0da3129c446074716bc (diff)
downloadcygnal-41abcc5825d33d78bd370997ba664e3c64eb6683.tar.gz
cygnal-41abcc5825d33d78bd370997ba664e3c64eb6683.tar.bz2
cygnal-41abcc5825d33d78bd370997ba664e3c64eb6683.zip
Revert "Refactor to avoid nonnull checks on "this" pointer."
This reverts commit 0008bdea02b690ab19ffe997499cb9a96ee5a66d. This patch introduced a regression. Calling FOO=$(...) in zsh hangs indefinitely and has to be killed forcefully. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/fhandler_process.cc')
-rw-r--r--winsup/cygwin/fhandler_process.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 81f04c97a..f0423f30f 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -371,11 +371,6 @@ format_process_fd (void *data, char *&destbuf)
case a trailing slash and more followup chars are allowed, provided the
descriptor symlink points to a directory. */
char *fdp = strchr (path, '/') + 3;
- if (!p)
- {
- set_errno (ENOENT);
- return 0;
- }
/* The "fd" directory itself? */
if (fdp[0] =='\0' || (fdp[0] == '/' && fdp[1] == '\0'))
{
@@ -484,7 +479,7 @@ format_process_root (void *data, char *&destbuf)
cfree (destbuf);
destbuf = NULL;
}
- destbuf = p ? p->root (fs) : NULL;
+ destbuf = p->root (fs);
if (!destbuf || !*destbuf)
{
destbuf = cstrdup ("<defunct>");
@@ -504,7 +499,7 @@ format_process_cwd (void *data, char *&destbuf)
cfree (destbuf);
destbuf = NULL;
}
- destbuf = p ? p->cwd (fs) : NULL;
+ destbuf = p->cwd (fs);
if (!destbuf || !*destbuf)
{
destbuf = cstrdup ("<defunct>");
@@ -524,7 +519,7 @@ format_process_cmdline (void *data, char *&destbuf)
cfree (destbuf);
destbuf = NULL;
}
- destbuf = p ? p->cmdline (fs) : NULL;
+ destbuf = p->cmdline (fs);
if (!destbuf || !*destbuf)
{
destbuf = cstrdup ("<defunct>");