In addition, I get a segfault if I use a single-quoted string rather than a double-quoted string. (My understanding is that single-quoted strings are normally used to reference symbols, so this should be an error but not a crash)
$ /usr/bin/gdb -batch -p $(pgrep -nx R) -ex "print (char*) getenv('oops')"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f69b4c870da in select () from /usr/lib/x86_64-linux-gnu/libc.so.6
Aborted (core dumped)
In addition, I get a segfault if I use a single-quoted string rather than a double-quoted string. (My understanding is that single-quoted strings are normally used to reference symbols, so this should be an error but not a crash)
$ /usr/bin/gdb -batch -p $(pgrep -nx R) -ex "print (char*) getenv('oops')" 64-linux- gnu/libthread_ db.so.1" . x86_64- linux-gnu/ libc.so. 6
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_
0x00007f69b4c870da in select () from /usr/lib/
Aborted (core dumped)