Posts: 4,559
Threads: 1,464
Joined: Sep 2016
in POSIX systems i can code in C to change the arguments that would be seen by the ps command. the typical reason for this is to identify what a each process, of many that are forked by a parent process, is doing. in Python, i want to do the same in each child i create with the multiprocessing module. in my current project i can launch 2 to 18 child worker processes, each accessing a different AWS region. i'd like to put that specific region name on that process' command line, as seen in ps. how can i do that in Python?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,559
Threads: 1,464
Joined: Sep 2016
in C you just update the pointer array passed to main in the 2nd argument to reference the new strings. the new array must be no longer than the old array or stack corruption is possible. a shorter array must end with NULL.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,559
Threads: 1,464
Joined: Sep 2016
i would agree to it being borderline hacking. i did some interesting hacking back in mainframe days. some things i did needed the CPU to be running in "supervisor state" which allowed access to anything, use of more instructions, and bypass virtual address translation. back then we didn't call it hacking. we just called it making it work.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.