plan9fox/sys/src/ape/lib/ap
Ori Bernstein 1047b53efc ape/libap: fix _startbuf, check rfork return (thanks pixelherodev)
When _startbuf is invoked, it would crash on the second invocation
if creating a mux segment failed. This is because the first attempt
would assign the return value -1 to the global mux variable, and
the second attempt would notice that the global mux was not nil,
and would attempt to use it.

This change only assigns to the global variable if the allocation
of the segment was a success.

While we're here, we should also check the return of the rfork call.
2021-01-19 19:56:38 -08:00
..
386 ape: return plan9 error strings from strerror() 2016-05-04 00:23:48 +02:00
68020 ape: return plan9 error strings from strerror() 2016-05-04 00:23:48 +02:00
amd64 Turn on warnings when building libap. 2019-06-21 10:00:58 -07:00
arm ape: return plan9 error strings from strerror() 2016-05-04 00:23:48 +02:00
arm64 libc: fix return value for arm64 memset() and memove() 2019-05-09 12:40:03 +02:00
gen strndup: don't assume buffer is terminated 2020-12-18 07:16:29 -08:00
math Turn on warnings when building libap. 2019-06-21 10:00:58 -07:00
mips ape: return plan9 error strings from strerror() 2016-05-04 00:23:48 +02:00
plan9 ape/libap: fix _startbuf, check rfork return (thanks pixelherodev) 2021-01-19 19:56:38 -08:00
posix Turn on warnings when building libap. 2019-06-21 10:00:58 -07:00
power ape: return plan9 error strings from strerror() 2016-05-04 00:23:48 +02:00
sparc ape: return plan9 error strings from strerror() 2016-05-04 00:23:48 +02:00
spim ape: add machine specific code for spim 2015-10-04 19:50:24 +02:00
stdio Fix scans of more than one character in %[] 2020-05-15 16:46:20 -07:00
syscall mkfiles: do not rely on path containing the . element 2013-10-26 20:22:01 +02:00
extraobjs Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
mkfile Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00