mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
Don't return if /proc couldn't be read
This commit is contained in:
parent
6fab399549
commit
304dd37afa
@ -659,16 +659,12 @@ read_args() {
|
|||||||
pifstream proc("/proc/curproc/cmdline");
|
pifstream proc("/proc/curproc/cmdline");
|
||||||
if (proc.fail()) {
|
if (proc.fail()) {
|
||||||
cerr << "Cannot read /proc/curproc/cmdline; command-line arguments unavailable to config.\n";
|
cerr << "Cannot read /proc/curproc/cmdline; command-line arguments unavailable to config.\n";
|
||||||
return;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
pifstream proc("/proc/self/cmdline");
|
pifstream proc("/proc/self/cmdline");
|
||||||
if (proc.fail()) {
|
if (proc.fail()) {
|
||||||
cerr << "Cannot read /proc/self/cmdline; command-line arguments unavailable to config.\n";
|
cerr << "Cannot read /proc/self/cmdline; command-line arguments unavailable to config.\n";
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
} else {
|
||||||
int ch = proc.get();
|
int ch = proc.get();
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while (!proc.eof() && !proc.fail()) {
|
while (!proc.eof() && !proc.fail()) {
|
||||||
@ -689,6 +685,7 @@ read_args() {
|
|||||||
|
|
||||||
ch = proc.get();
|
ch = proc.get();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user