Fix Savannah bug # 13478. If -L is given, take the latest mtime for a
[make/kirr.git] / remote-stub.c
blob14964889a42482bb59da2361fde446c240bf74e9
1 /* Template for the remote job exportation interface to GNU Make.
2 Copyright (C) 1988, 1989, 1992, 1993, 1996 Free Software Foundation, Inc.
3 This file is part of GNU Make.
5 GNU Make is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
10 GNU Make is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNU Make; see the file COPYING. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 #include "make.h"
21 #include "filedef.h"
22 #include "job.h"
23 #include "commands.h"
26 char *remote_description = 0;
28 /* Call once at startup even if no commands are run. */
30 void
31 remote_setup (void)
35 /* Called before exit. */
37 void
38 remote_cleanup (void)
42 /* Return nonzero if the next job should be done remotely. */
44 int
45 start_remote_job_p (int first_p UNUSED)
47 return 0;
50 /* Start a remote job running the command in ARGV,
51 with environment from ENVP. It gets standard input from STDIN_FD. On
52 failure, return nonzero. On success, return zero, and set *USED_STDIN
53 to nonzero if it will actually use STDIN_FD, zero if not, set *ID_PTR to
54 a unique identification, and set *IS_REMOTE to zero if the job is local,
55 nonzero if it is remote (meaning *ID_PTR is a process ID). */
57 int
58 start_remote_job (char **argv UNUSED, char **envp UNUSED, int stdin_fd UNUSED,
59 int *is_remote UNUSED, int *id_ptr UNUSED,
60 int *used_stdin UNUSED)
62 return -1;
65 /* Get the status of a dead remote child. Block waiting for one to die
66 if BLOCK is nonzero. Set *EXIT_CODE_PTR to the exit status, *SIGNAL_PTR
67 to the termination signal or zero if it exited normally, and *COREDUMP_PTR
68 nonzero if it dumped core. Return the ID of the child that died,
69 0 if we would have to block and !BLOCK, or < 0 if there were none. */
71 int
72 remote_status (int *exit_code_ptr UNUSED, int *signal_ptr UNUSED,
73 int *coredump_ptr UNUSED, int block UNUSED)
75 errno = ECHILD;
76 return -1;
79 /* Block asynchronous notification of remote child death.
80 If this notification is done by raising the child termination
81 signal, do not block that signal. */
82 void
83 block_remote_children (void)
85 return;
88 /* Restore asynchronous notification of remote child death.
89 If this is done by raising the child termination signal,
90 do not unblock that signal. */
91 void
92 unblock_remote_children (void)
94 return;
97 /* Send signal SIG to child ID. Return 0 if successful, -1 if not. */
98 int
99 remote_kill (int id UNUSED, int sig UNUSED)
101 return -1;