tput: check sbrk return value
This commit is contained in:
parent
a284b57091
commit
2dec35524e
1 changed files with 2 additions and 0 deletions
|
@ -36,6 +36,8 @@ main(int argc, char **argv)
|
||||||
bc = 0;
|
bc = 0;
|
||||||
sec = 0;
|
sec = 0;
|
||||||
buf = sbrk(buflen);
|
buf = sbrk(buflen);
|
||||||
|
if(buf == (void*)-1)
|
||||||
|
sysfatal("out of memory");
|
||||||
cpid = rfork(RFPROC | RFMEM);
|
cpid = rfork(RFPROC | RFMEM);
|
||||||
if(cpid == 0) {
|
if(cpid == 0) {
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
Loading…
Reference in a new issue