You can use strace on a specific pid to figure out what a specific process is doing, e.g.:
strace -fp <pid>
You might see something like:
select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)
const { NodeVM } = require('vm2'); | |
const vm = new NodeVM({ | |
console: 'inherit', | |
sandbox: { hello: hello }, | |
require: { | |
external: false, | |
builtin: ['fs', 'path'], | |
} | |
}); | |
var code = ` |
const { NodeVM } = require('vm2'); | |
const vm = new NodeVM({ | |
console: 'inherit', | |
sandbox: {}, | |
require: { | |
external: false, | |
builtin: ['fs', 'path'], | |
} | |
}); | |
var code = ` |
import fcntl | |
import os | |
import struct | |
import subprocess | |
# Some constants used to ioctl the device file. I got them by a simple C | |
# program. | |
TUNSETIFF = 0x400454ca | |
TUNSETOWNER = TUNSETIFF + 2 |
package main | |
import ( | |
"flag" | |
"net" | |
"os" | |
) | |
func main() { | |
var addr string |
package main | |
import ( | |
"flag" | |
"net" | |
"os" | |
"time" | |
"github.com/singchia/go-hammer/circulinker" | |
) |
# Borrowed from: | |
# https://github.com/silven/go-example/blob/master/Makefile | |
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/ | |
BINARY = superdo | |
VET_REPORT = vet.report | |
TEST_REPORT = tests.xml | |
GOARCH = amd64 | |
VERSION?=? |
package main | |
import ( | |
"flag" | |
"fmt" | |
"net" | |
"os" | |
"sync" | |
"time" | |
) |
// https://banu.com/blog/2/how-to-use-epoll-a-complete-example-in-c/ | |
// http://www.kegel.com/poller/ | |
/** Todo | |
* - [ ] Split i/o and logic | |
* - [ ] Unit test logic | |
* - [ ] Logging | |
* - [ ] Continuous integration | |
* - [ ] Linux | |
* - [ ] Windows |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"os" | |
"strconv" | |
"sync" | |
"time" | |
) |