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