Revert "Refactor to avoid nonnull checks on "this" pointer."
This reverts commit 0008bdea02
.
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>
This commit is contained in:
@ -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>");
|
||||
|
Reference in New Issue
Block a user