* sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Jul 2013 05:36:50 +0000 (22:36 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Jul 2013 05:36:50 +0000 (22:36 -0700)
commitab9980cd3ba7e1cefe846610dccdc86923dcdb86
treedb46d81037a960b07d1963cfd9166b8358b0c77d
parent1396ac86dea5fccab800e4b25fdb5319381891eb
* sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.

(procfs_ttyname): Don't use uninitialized storage if emacs_fopen
or fscanf fails.
(system_process_attributes): Prefer plain char to unsigned char
when either will do.  Clean up properly if interrupted or if
memory allocations fail.  Don't assume sscanf succeeds.  Remove
no-longer-needed workaround to stop GCC from whining.  Read
command-line once, instead of multiple times.  Check read status a
bit more carefully.
src/ChangeLog
src/sysdep.c