puppy
puppy copied to clipboard
proctable does not fill in argument data anymore
As part of fixing https://github.com/egranata/puppy/issues/57 proctable_syscall_handler has been hacked to read
#if 0
if (p->args) {
strncpy(&pi.args[0], p->args, sizeof(pi.args));
} else {
bzero(&pi.args[0], sizeof(pi.args));
}
#endif
This should be undone and args filled correctly
This is a bit tricky do to because argv is an array; passing a string to userland is relatively easy with a fixed-size buffer, but passing an array is not as obvious
One way to go about this is the UNIX style, where one does not get the individual argv items, but a "cmdline" (in UNIX, a file in /proc/pid) that is just a concatenated string (well, separated by \0 at the argv boundary, but that's not much different for the purposes of the implementation)