/* Common code for executing a program in a sub-process.
- Copyright (C) 2005, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@airs.com>.
This file is part of the libiberty library.
if (out < 0)
{
out = obj->funcs->open_write (obj, outname,
- (flags & PEX_BINARY_OUTPUT) != 0);
+ (flags & PEX_BINARY_OUTPUT) != 0,
+ (flags & PEX_STDOUT_APPEND) != 0);
if (out < 0)
{
*err = errno;
}
else
{
- errdes = obj->funcs->open_write (obj, errname,
- (flags & PEX_BINARY_ERROR) != 0);
+ errdes = obj->funcs->open_write (obj, errname,
+ (flags & PEX_BINARY_ERROR) != 0,
+ (flags & PEX_STDERR_APPEND) != 0);
if (errdes < 0)
{
*err = errno;
if (obj->next_input_name_allocated)
free (obj->next_input_name);
- if (obj->children != NULL)
- free (obj->children);
- if (obj->status != NULL)
- free (obj->status);
- if (obj->time != NULL)
- free (obj->time);
+ free (obj->children);
+ free (obj->status);
+ free (obj->time);
if (obj->remove_count > 0)
{