|
Packit |
26a39e |
/* Template for the remote job exportation interface to GNU Make.
|
|
Packit |
26a39e |
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
|
Packit |
26a39e |
This file is part of GNU Make.
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
GNU Make is free software; you can redistribute it and/or modify it under the
|
|
Packit |
26a39e |
terms of the GNU General Public License as published by the Free Software
|
|
Packit |
26a39e |
Foundation; either version 3 of the License, or (at your option) any later
|
|
Packit |
26a39e |
version.
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
Packit |
26a39e |
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
Packit |
26a39e |
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
You should have received a copy of the GNU General Public License along with
|
|
Packit |
26a39e |
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
#include "makeint.h"
|
|
Packit |
26a39e |
#include "filedef.h"
|
|
Packit |
26a39e |
#include "job.h"
|
|
Packit |
26a39e |
#include "commands.h"
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
char *remote_description = 0;
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
/* Call once at startup even if no commands are run. */
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
void
|
|
Packit |
26a39e |
remote_setup (void)
|
|
Packit |
26a39e |
{
|
|
Packit |
26a39e |
}
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
/* Called before exit. */
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
void
|
|
Packit |
26a39e |
remote_cleanup (void)
|
|
Packit |
26a39e |
{
|
|
Packit |
26a39e |
}
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
/* Return nonzero if the next job should be done remotely. */
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
int
|
|
Packit |
26a39e |
start_remote_job_p (int first_p UNUSED)
|
|
Packit |
26a39e |
{
|
|
Packit |
26a39e |
return 0;
|
|
Packit |
26a39e |
}
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
/* Start a remote job running the command in ARGV,
|
|
Packit |
26a39e |
with environment from ENVP. It gets standard input from STDIN_FD. On
|
|
Packit |
26a39e |
failure, return nonzero. On success, return zero, and set *USED_STDIN
|
|
Packit |
26a39e |
to nonzero if it will actually use STDIN_FD, zero if not, set *ID_PTR to
|
|
Packit |
26a39e |
a unique identification, and set *IS_REMOTE to zero if the job is local,
|
|
Packit |
26a39e |
nonzero if it is remote (meaning *ID_PTR is a process ID). */
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
int
|
|
Packit |
26a39e |
start_remote_job (char **argv UNUSED, char **envp UNUSED, int stdin_fd UNUSED,
|
|
Packit |
26a39e |
int *is_remote UNUSED, int *id_ptr UNUSED,
|
|
Packit |
26a39e |
int *used_stdin UNUSED)
|
|
Packit |
26a39e |
{
|
|
Packit |
26a39e |
return -1;
|
|
Packit |
26a39e |
}
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
/* Get the status of a dead remote child. Block waiting for one to die
|
|
Packit |
26a39e |
if BLOCK is nonzero. Set *EXIT_CODE_PTR to the exit status, *SIGNAL_PTR
|
|
Packit |
26a39e |
to the termination signal or zero if it exited normally, and *COREDUMP_PTR
|
|
Packit |
26a39e |
nonzero if it dumped core. Return the ID of the child that died,
|
|
Packit |
26a39e |
0 if we would have to block and !BLOCK, or < 0 if there were none. */
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
int
|
|
Packit |
26a39e |
remote_status (int *exit_code_ptr UNUSED, int *signal_ptr UNUSED,
|
|
Packit |
26a39e |
int *coredump_ptr UNUSED, int block UNUSED)
|
|
Packit |
26a39e |
{
|
|
Packit |
26a39e |
errno = ECHILD;
|
|
Packit |
26a39e |
return -1;
|
|
Packit |
26a39e |
}
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
/* Block asynchronous notification of remote child death.
|
|
Packit |
26a39e |
If this notification is done by raising the child termination
|
|
Packit |
26a39e |
signal, do not block that signal. */
|
|
Packit |
26a39e |
void
|
|
Packit |
26a39e |
block_remote_children (void)
|
|
Packit |
26a39e |
{
|
|
Packit |
26a39e |
return;
|
|
Packit |
26a39e |
}
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
/* Restore asynchronous notification of remote child death.
|
|
Packit |
26a39e |
If this is done by raising the child termination signal,
|
|
Packit |
26a39e |
do not unblock that signal. */
|
|
Packit |
26a39e |
void
|
|
Packit |
26a39e |
unblock_remote_children (void)
|
|
Packit |
26a39e |
{
|
|
Packit |
26a39e |
return;
|
|
Packit |
26a39e |
}
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
/* Send signal SIG to child ID. Return 0 if successful, -1 if not. */
|
|
Packit |
26a39e |
int
|
|
Packit |
26a39e |
remote_kill (int id UNUSED, int sig UNUSED)
|
|
Packit |
26a39e |
{
|
|
Packit |
26a39e |
return -1;
|
|
Packit |
26a39e |
}
|