Skip to content

AIX: process_substition: unlink temporary files immediately after opening #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions subst.c
Original file line number Diff line number Diff line change
Expand Up @@ -5926,6 +5926,11 @@ process_substitute (string, open_for_read_in_child)
#if !defined (HAVE_DEV_FD)
/* Open the named pipe in the child. */
fd = open (pathname, open_for_read_in_child ? O_RDONLY : O_WRONLY);
#ifdef _AIX
/* Only tested on AIX */
/* now that the file is open (or not) * unlink it to keep garbage down */
unlink(pathname);
#endif
if (fd < 0)
{
/* Two separate strings for ease of translation. */
Expand Down