1178172Simp/* Template for the remote job exportation interface to GNU Make. 2178172SimpCopyright (C) 1988, 1989, 1992, 1993, 1996 Free Software Foundation, Inc. 3178172SimpThis file is part of GNU Make. 4178172Simp 5178172SimpGNU Make is free software; you can redistribute it and/or modify 6178172Simpit under the terms of the GNU General Public License as published by 7178172Simpthe Free Software Foundation; either version 2, or (at your option) 8178172Simpany later version. 9178172Simp 10178172SimpGNU Make is distributed in the hope that it will be useful, 11178172Simpbut WITHOUT ANY WARRANTY; without even the implied warranty of 12178172SimpMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13178172SimpGNU General Public License for more details. 14178172Simp 15178172SimpYou should have received a copy of the GNU General Public License 16178172Simpalong with GNU Make; see the file COPYING. If not, write to 17178172Simpthe Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18178172SimpBoston, MA 02111-1307, USA. */ 19178172Simp 20178172Simp#include "make.h" 21178172Simp#include "filedef.h" 22178172Simp#include "job.h" 23178172Simp#include "commands.h" 24178172Simp 25178172Simp 26178172Simpchar *remote_description = 0; 27178172Simp 28178172Simp/* Call once at startup even if no commands are run. */ 29178172Simp 30178172Simpvoid 31178172Simpremote_setup () 32178172Simp{ 33178172Simp} 34178172Simp 35178172Simp/* Called before exit. */ 36178172Simp 37178172Simpvoid 38178172Simpremote_cleanup () 39178172Simp{ 40178172Simp} 41178172Simp 42178172Simp/* Return nonzero if the next job should be done remotely. */ 43178172Simp 44178172Simpint 45178172Simpstart_remote_job_p (first_p) 46178172Simp int first_p; 47178172Simp{ 48178172Simp return 0; 49178172Simp} 50178172Simp 51178172Simp/* Start a remote job running the command in ARGV, 52178172Simp with environment from ENVP. It gets standard input from STDIN_FD. On 53178172Simp failure, return nonzero. On success, return zero, and set *USED_STDIN 54178172Simp to nonzero if it will actually use STDIN_FD, zero if not, set *ID_PTR to 55178172Simp a unique identification, and set *IS_REMOTE to zero if the job is local, 56178172Simp nonzero if it is remote (meaning *ID_PTR is a process ID). */ 57178172Simp 58178172Simpint 59178172Simpstart_remote_job (argv, envp, stdin_fd, is_remote, id_ptr, used_stdin) 60178172Simp char **argv, **envp; 61178172Simp int stdin_fd; 62178172Simp int *is_remote; 63178172Simp int *id_ptr; 64178172Simp int *used_stdin; 65178172Simp{ 66178172Simp return -1; 67178172Simp} 68178172Simp 69178172Simp/* Get the status of a dead remote child. Block waiting for one to die 70178172Simp if BLOCK is nonzero. Set *EXIT_CODE_PTR to the exit status, *SIGNAL_PTR 71178172Simp to the termination signal or zero if it exited normally, and *COREDUMP_PTR 72178172Simp nonzero if it dumped core. Return the ID of the child that died, 73178172Simp 0 if we would have to block and !BLOCK, or < 0 if there were none. */ 74178172Simp 75178172Simpint 76178172Simpremote_status (exit_code_ptr, signal_ptr, coredump_ptr, block) 77178172Simp int *exit_code_ptr, *signal_ptr, *coredump_ptr; 78178172Simp int block; 79178172Simp{ 80178172Simp errno = ECHILD; 81178172Simp return -1; 82178172Simp} 83178172Simp 84178172Simp/* Block asynchronous notification of remote child death. 85178172Simp If this notification is done by raising the child termination 86178172Simp signal, do not block that signal. */ 87178172Simpvoid 88178172Simpblock_remote_children () 89178172Simp{ 90178172Simp return; 91178172Simp} 92178172Simp 93178172Simp/* Restore asynchronous notification of remote child death. 94178172Simp If this is done by raising the child termination signal, 95178172Simp do not unblock that signal. */ 96178172Simpvoid 97178172Simpunblock_remote_children () 98178172Simp{ 99178172Simp return; 100178172Simp} 101178172Simp 102178172Simp/* Send signal SIG to child ID. Return 0 if successful, -1 if not. */ 103178172Simpint 104178172Simpremote_kill (id, sig) 105178172Simp int id; 106178172Simp int sig; 107178172Simp{ 108178172Simp return -1; 109178172Simp} 110178172Simp