summaryrefslogtreecommitdiff
path: root/job.h
Commit message (Collapse)AuthorAgeFilesLines
* [SV 42447]: VMS simulate exporting symbolsJohn Malmberg2014-10-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also includes fixing the most of the exit handling code for VMS. Self tests: Previously about 94 Tests in 36 categories fail. Now about 45 tests in 22 categories fail. Because some tests do not properly clean up, the number of tests that fail can vary by one or two test cases between consecutive runs. * Makefile.am: Add new VMS files. * job.c: add prototype for vms_strsignal(). * job.c: (child_error): Remove VMS specific code as no longer needed. * job.c: (reap_children): The VMS specific code was setting the status to 0 instead of setting it to the proper exit status. * job.h: Add vms_launch_status to struct child. * main.c: (main): Use environment variables for options to use MCR * instead of a foreign command, and to always use command files for subprocesses. For VMS use (set_program_name) routine which is common to ports of other GNU packages to VMS to set the program name used internally. Use (vms_putenv_symbol) to set up symbols to be visible in child programs, including recursive make launched by execve() Start of Bash shell detection code for VMS. * makefile.com: Need nested_include=none for building on VMS search lists. Add vms_progname, vms_exit, and vms_export_symbol. * makefile.vms: Need nested_include=none for building on VMS search lists. Add vms_progname, vms_exit, vms_export_symbol. * makeint.h: Make sure non-standard "VMS" macro is defined. Add prototypes for new VMS routines. Remove VMS-specific failure codes. * vmsjobs.c: Add VMS POSIX exit code constants. (_is_unixy_shell): Detect Bash shell. (vms_strsignal): simulate strsignal() on VMS. (vmsHandleChildTerm): fix to properly report failed LIB$SPAWN() exit status codes. Remove code that duplicated code in job.c. (child_execute_job): Export environment symbols before spawning a child and restore afterward unless option to use command files for subprocesses is set. Improve handling of UNIX null commands ":". * vms_exit.c: Provides vms_exit() to detect if an exit code is UNIX or VMS, and converts the UNIX code into a VMS exit code. * vms_export_symbol.c: Routines to create DCL symbols that work like shell aliases or exported shell symbols and clean them up on exit. * vms_export_symbol_test.com: Unit test for vms_export_symbol.c * vms_progname.c: New file: VMS specific replace for progname.c that is used in some GNU projects.
* Update Copyright statements for 2014.Paul Smith2014-09-301-1/+1
|
* [SV 40361] Don't use vsnprintf(), which is an ISO C99 function.Paul Smith2013-11-231-2/+2
| | | | | | | | | | * output.c (error, fatal, message): Take an extra argument specifying how many bytes are used by the formatted arguments. (get_buffer): New function that allocates the requested buffer size. Remove msc_vsnprintf(), vfmtconcat(), and fmtconcat() as unneeded. * makeint.h: Declare various helper macros for generating output. * *.c: Change all error(), fatal(), message() calls to use the macros, or pass the extra length argument directly.
* Fix build failures on EMX for output-sync support.Paul Smith2013-09-291-1/+1
|
* Fix broken w32 build due to OUTPUT_SYNC -> NO_OUTPUT_SYNC inversion.Eli Zaretskii2013-09-231-1/+1
| | | | | w32/compat/posixfcn.c: Fix the forgotten OUTPUT_SYNC conditional. job.h: Ditto, but in a comment.
* Invert the #define for output-sync: turn it off with NO_OUTPUT_SYNCPaul Smith2013-09-211-7/+6
|
* Ensure that stderr from shell functions in recipes is synced.Paul Smith2013-09-211-3/+10
|
* Enhance the output sync mode.Paul Smith2013-09-121-13/+9
| | | | | | | | | | | | | | | Create a new file, output.c, and collect functions that generate output there. We introduce a new global context specifying where output should go (to stdout or to a sync file), and the lowest level output generator chooses where to write output based on that context. This allows us to set the context globally, and all operations that write output (including functions like $(info ...) etc.) will use it. Removed the "--trace=dir" capability. It was too confusing. If you have directory tracking enabled then output sync will print the enter/leave message for each synchronized block. If you don't want that, disable directory tracking.
* Notify the compiler that exec_command() won't return.Paul Smith2013-07-141-2/+2
|
* Porting to VMS, from Hartmut Becker.Paul Smith2013-05-271-0/+4
|
* Update source file format: remove TABs, use GNU coding styles.Paul Smith2013-05-171-28/+29
|
* Update copyright for changes in 2013.Paul Smith2013-05-171-1/+1
|
* Add support for per-job output sync.Paul Smith2013-04-281-5/+3
| | | | | | | | | A new flag to the -O/--output-sync, "job", selects a per-job (that is, per line of a recipe) output synchronization. To support this move the close of the temp file out of the sync_output() function and don't do it until we free the child, since we may call sync_output() multiple times in a given recipe. When we set up for a new temp file, if we're in per-job mode we truncate the file and seek to the beginning to re-use it for every job.
* Support --output-sync on MS-Windows.Eli Zaretskii2013-04-271-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | w32/compat/posixfcn.c: New file, with emulations of Posix functions and Posix functionality for MS-Windows. w32/subproc/sub_proc.c: Include io.h. (process_noinherit): New function, forces a file descriptor to not be inherited by child processes. (process_easy): Accept two additional arguments, and use them to set up the standard output and standard error handles of the child process. w32/include/sub_proc.h (process_easy): Adjust prototype. (process_noinherit): Add prototype. read.c [WINDOWS32]: Include windows.h and sub_proc.h. makeint.h (LOCALEDIR) [WINDOWS32}: Define to NULL if not defined. This is needed because the MS-Windows build doesn't have a canonical place for LOCALEDIR. (WIN32_LEAN_AND_MEAN) [WINDOWS32]: Define, to avoid getting from windows.h header too much stuff that could conflict with the code. main.c <sync_mutex>: New static variable. <switches>: Add support for "--sync-mutex" switch. (decode_output_sync_flags): Decode the --sync-mutex= switch. (prepare_mutex_handle_string) [WINDOWS32]: New function. (main): Add "output-sync" to .FEATURES. job.h (CLOSE_ON_EXEC) [WINDOWS32]: Define to call process_noinherit. (F_GETFD, F_SETLKW, F_WRLCK, F_UNLCK, struct flock) [WINDOWS32]: New macros. (RECORD_SYNC_MUTEX): New macro, a no-op for Posix platforms. (sync_handle_t): New typedef. job.c <sync_handle>: Change type to sync_handle_t. (FD_NOT_EMPTY): Seek to the file's end. Suggested by Frank Heckenbach <f.heckenbach@fh-soft.de>. (pump_from_tmp_fd) [WINDOWS32]: Switch to_fd to binary mode for the duration of this function, and then change back before returning. (start_job_command) [WINDOWS32]: Support output_sync mode on MS-Windows. Use a system-wide mutex instead of locking stdout/stderr. Call process_easy with two additional arguments: child->outfd and child->errfd. (exec_command) [WINDOWS32]: Pass two additional arguments, both -1, to process_easy, to adjust for the changed function signature. function.c (windows32_openpipe) [WINDOWS32]: This function now returns an int, which is -1 if it fails and zero otherwise. It also calls 'error' instead of 'fatal', to avoid exiting prematurely. (func_shell_base) [WINDOWS32]: Call perror_with_name if windows32_openpipe fails, now that it always returns. This avoids a compiler warning that error_prefix is not used in the MS-Windows build. config.h.W32.template (OUTPUT_SYNC): Define. build_w32.bat: Add w32/compat/posixfcn.c to compilation and linking commands. From Frank Heckenbach <f.heckenbach@fh-soft.de>: job.c (sync_output): Don't discard the output if acquire_semaphore fails; instead, dump the output unsynchronized.
* Create an open_tmpfd() function to return temp files by FD. Use it.Paul Smith2013-04-161-4/+0
|
* Rename the "parallel-sync" option to "output-sync".Paul Smith2013-04-141-7/+7
|
* Initial patch for output synchronization. See Savannah bug #33138.Frank Heckenbach2013-04-141-0/+8
| | | | Based on work by David Boyce <David.S.Boyce@gmail.com>.
* Rearrange elements to reduce struct size on 64bit architectures.Paul Smith2012-10-281-7/+5
|
* Simplify copyrights using ranges of years.Paul Smith2012-03-051-3/+1
| | | | | The new GNU Maintainer's Manual allows the use of year ranges in certain situations; take advantage of this simplification.
* Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines.Paul Smith2012-03-041-1/+1
| | | | Fixes Savannah bug #34530.
* Update copyright notices.Paul Smith2012-01-161-2/+2
|
* Update copyrights for 2010.Paul Smith2010-07-131-1/+2
|
* Add the beginning of the .ONESHELL special feature.Paul Smith2010-07-121-0/+1
| | | | Original patch by David Boyce. Modified by Paul Smith.
* Add VMS enhancements from Hartmut Becker.Paul Smith2009-11-161-0/+1
|
* Update copyright years.Paul Smith2009-10-251-1/+1
|
* Fixes from Eli Zaretskii:Paul Smith2007-10-101-1/+2
| | | | | Fix to allow quoted directories in PATH. Fix for Savannah bug #20549.
* * Update to GPLv3Paul Smith2007-07-041-4/+4
| | | | | * Update copyright to 2007 * Fix download URL for translation files (thanks to Thiemo Seufer)
* Code cleanup: Remove all references to PARAMS() & ansi2knr.Paul Smith2006-04-071-12/+12
|
* Last of the copyright updates.Paul Smith2006-02-111-2/+2
|
* Update copyright and license notices on all files.Paul Smith2006-02-111-13/+11
| | | | Added new file strcache.c to various non-UNIX makefiles and build scripts.
* Fixed Savannah bug #15641.Boris Kolpackov2006-02-081-0/+1
|
* Fix problems with losing tokens in the jobserver, reported by GrantPaul Smith2005-05-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Taylor. There are two forms of this: first, it was possible to lose tokens when using -j and -l at the same time, because waiting jobs were not checked when determining whether any jobs were outstanding. Second, if you had an exported recursive variable that contained a $(shell ...) function there is a possibility to lose tokens, since a token was taken but the child list was not updated until after the shell function was complete. To resolve this I introduced a new variable that counted the number of tokens we have obtained, rather than checking whether there were any children on the list. I also added some sanity checks to make sure we weren't writing back too many or not enough tokens. And, the master make will drain the token pipe before exiting and compare the count of tokens at the end to what was written there at the beginning. Also: * Ensure a bug in the environment (missing "=") doesn't cause make to core. * Rename the .DEFAULT_TARGET variable to .DEFAULT_GOAL, to match the terminology in the documentation and other variables like MAKECMDGOALS. * Add documentation of the .DEFAULT_GOAL special variable. Still need to document the secondary expansion stuff...
* Add support for OS/2, contributed by Andreas Buening <andreas.buening@nexgo.de>Paul Smith2003-03-241-0/+21
| | | | Also a small patch from Hartmut Becker <Hartmut.Becker@compaq.com> for VMS.
* * Fix jobserver algorithm again.Paul Smith1999-08-231-1/+0
| | | | | * A couple of nits. * Fix considered pruning for double-colon rules.
* * Add new jobserver feature.Paul Smith1999-04-251-2/+3
| | | | | * Small updates to the manual * E.Zaretskii fix for new DJGPP version.
* * Update FSF address info in copyright notices.Paul Smith1999-03-051-1/+2
| | | | | | | | * Update maintainers build process; remove GNUmakefile. Require builders to run automake && autoreconf by hand. * Use AC_SUBST_FILE to get the maintMakefile included, rather than GNU make's include directive, which conflicts with automake 1.4's include directive.
* Checkpoint changes. Bug fixes, mostly.Paul Smith1998-10-031-1/+1
|
* GNU make release 3.77.Paul Smith1998-07-301-1/+2
|
* Sat Jun 22 14:56:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1996-06-221-1/+2
| | | | | | | | * job.c (start_job_command): Call block_sigs. (block_sigs): New function, broken out of start_job_command. (reap_children): Block fatal signals around removing dead child from chain and adjusting job_slots_used. * job.h: Declare block_sigs.
* Sun May 12 19:19:43 1996 Aaron Digulla <digulla@fh-konstanz.de>Roland McGrath1996-05-131-0/+4
| | | | * job.h: No envp on Amiga
* Tue Mar 19 20:21:34 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>Roland McGrath1996-03-201-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merged VMS port from Klaus Kaempf <kkaempf@didymus.rmi.de>. * make.h (PARAMS): New macro. * config.h-vms: New file. * makefile.com: New file. * makefile.vms: New file. * readme.vms: New file. * vmsdir.h: New file. * vmsfunctions.c: New file. * vmsify.c: New file. * file.h: Renamed to filedef.h to avoid conflict with VMS system hdr. * ar.c: Added prototypes and changes for VMS. * commands.c: Likewise. * commands.h: Likewise. * default.c: Likewise. * dep.h: Likewise. * dir.c: Likewise. * expand.c: Likewise. * file.c: Likewise. * function.c: Likewise. * implicit.c: Likewise. * job.c: Likewise. * job.h: Likewise. * main.c: Likewise. * make.h: Likewise. * misc.c: Likewise. * read.c: Likewise. * remake.c: Likewise. * remote-stub.c: Likewise. * rule.c: Likewise. * rule.h: Likewise. * variable.c: Likewise. * variable.h: Likewise. * vpath.c: Likewise. * compatMakefile (srcs): Rename file.h to filedef.h.
* entered into RCSRoland McGrath1994-03-231-1/+2
|
* Formerly job.h.~6~Roland McGrath1993-10-141-1/+1
|
* Formerly job.h.~5~Roland McGrath1993-02-011-0/+11
|
* Formerly job.h.~4~Roland McGrath1993-01-061-1/+2
|
* Formerly job.h.~3~Roland McGrath1992-04-211-2/+1
|
* Formerly job.h.~2~Roland McGrath1992-04-211-0/+17
|
* Initial revisionRoland McGrath1991-03-231-0/+34