summaryrefslogtreecommitdiff
path: root/src/w32proc.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-11-16 17:50:56 +0200
committerEli Zaretskii <eliz@gnu.org>2013-11-16 17:50:56 +0200
commit8dc689ce3897b6a11877ecf9140fec859f1b95a5 (patch)
tree7a1c83c9a18720f7761e2e4fbd2f4dc8be75e9e0 /src/w32proc.c
parentf5c287f4fa22070b4b65fc6e731dd359daa7acce (diff)
downloademacs-8dc689ce3897b6a11877ecf9140fec859f1b95a5.tar.gz
Converted sys_unlink and sys_rmdir, got rid of pending deletion in w32proc.c.
Diffstat (limited to 'src/w32proc.c')
-rw-r--r--src/w32proc.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/w32proc.c b/src/w32proc.c
index 89748267bc6..de4e9103173 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -861,8 +861,6 @@ new_child (void)
cp->pid = -1;
cp->procinfo.hProcess = NULL;
cp->status = STATUS_READ_ERROR;
- cp->input_file = NULL;
- cp->pending_deletion = 0;
/* use manual reset event so that select() will function properly */
cp->char_avail = CreateEvent (NULL, TRUE, FALSE, NULL);
@@ -911,21 +909,6 @@ delete_child (child_process *cp)
if (!CHILD_ACTIVE (cp) && cp->procinfo.hProcess == NULL)
return;
- /* Delete the child's temporary input file, if any, that is pending
- deletion. */
- if (cp->input_file)
- {
- if (cp->pending_deletion)
- {
- if (unlink (cp->input_file))
- DebPrint (("delete_child.unlink (%s) failed, errno: %d\n",
- cp->input_file, errno));
- cp->pending_deletion = 0;
- }
- xfree (cp->input_file);
- cp->input_file = NULL;
- }
-
/* reap thread if necessary */
if (cp->thrd)
{
@@ -1182,45 +1165,6 @@ register_child (pid_t pid, int fd)
fd_info[fd].cp = cp;
}
-/* Record INFILE as an input file for process PID. */
-void
-record_infile (pid_t pid, char *infile)
-{
- child_process *cp;
-
- /* INFILE should never be NULL, since xstrdup would have signaled
- memory full condition in that case, see callproc.c where this
- function is called. */
- eassert (infile);
-
- cp = find_child_pid ((DWORD)pid);
- if (cp == NULL)
- {
- DebPrint (("record_infile is unable to find pid %lu\n", pid));
- return;
- }
-
- cp->input_file = infile;
-}
-
-/* Mark the input file INFILE of the corresponding subprocess as
- temporary, to be deleted when the subprocess exits. */
-void
-record_pending_deletion (char *infile)
-{
- child_process *cp;
-
- eassert (infile);
-
- for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--)
- if (CHILD_ACTIVE (cp)
- && cp->input_file && xstrcasecmp (cp->input_file, infile) == 0)
- {
- cp->pending_deletion = 1;
- break;
- }
-}
-
/* Called from waitpid when a process exits. */
static void
reap_subprocess (child_process *cp)