1 | // What command was this VM launched with? |
2 | static S getVMCommand() {
|
3 | if (isWindows()) fail("Windows!");
|
4 | |
5 | S bla = backtick("ps -u -p " + getProcessID());
|
6 | L<S> lines = toLines(bla); |
7 | S header = lines.get(0); |
8 | S body = lines.get(1); |
9 | int idx = header.indexOf("COMMAND");
|
10 | ret body.substring(idx).trim(); |
11 | } |
Began life as a copy of #1002495
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1002575 |
| Snippet name: | getVMCommand (Linux/possibly Android/possibly Mac OS) |
| Eternal ID of this version: | #1002575/1 |
| Text MD5: | ef4e3c49468f8b8be95e8ccc0801e62e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-02-02 17:55:47 |
| Source code size: | 324 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 836 / 791 |
| Referenced in: | [show references] |