ObjFW  Check-in [397b4ee50b]

Overview
Comment:OFProcess: Send SIGTERM on close

SIGKILL was a little bit too much.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.8
Files: files | file ages | folders
SHA3-256: 397b4ee50b66939c61fa63b055c6e31599d2661dbc6957737773d97bc5f33882
User & Date: js on 2015-08-26 08:24:58
Other Links: branch diff | manifest | tags
Context
2015-08-26
08:53
Make sure of_hash_seed is never initialized to 0 check-in: 1b09ca22f3 user: js tags: 0.8
08:24
OFProcess: Send SIGTERM on close check-in: 397b4ee50b user: js tags: 0.8
2015-08-23
20:54
Documentation improvements check-in: d559a8b0a3 user: js tags: 0.8
Changes

Modified src/OFProcess.m from [30416b7510] to [dc696d6c83].

564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
#ifndef _WIN32
	if (_readPipe[0] != -1)
		close(_readPipe[0]);
	if (_writePipe[1] != -1)
		close(_writePipe[1]);

	if (_pid != -1) {
		kill(_pid, SIGKILL);
		waitpid(_pid, &_status, WNOHANG);
	}

	_pid = -1;
	_readPipe[0] = -1;
	_writePipe[1] = -1;
#else







|







564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
#ifndef _WIN32
	if (_readPipe[0] != -1)
		close(_readPipe[0]);
	if (_writePipe[1] != -1)
		close(_writePipe[1]);

	if (_pid != -1) {
		kill(_pid, SIGTERM);
		waitpid(_pid, &_status, WNOHANG);
	}

	_pid = -1;
	_readPipe[0] = -1;
	_writePipe[1] = -1;
#else