269 reputation
212
bio website jacksblackboard.blogspot.it
location Montereale Valcellina (Italy)
age 23
visits member for 2 years, 3 months
seen yesterday

I'm a Computer Science student at the Scuola Superiore of the University of Udine. I've been interested in Computer Science since my third high-school year, and thus I've decided to apply to join one of the Schools of Excellence, and succeeded in this task.


Jan
26
revised How can I kill a process and be sure the PID hasn't been reused
Use lstart= instead of start= for more reliable comparison.
Jan
26
comment How can I kill a process and be sure the PID hasn't been reused
@StéphaneChazelas Yes, but you let it continue afterwards. I explicitly said: depending on the type of task that that process is performing you may have some trouble for stopping it some milliseconds. Thanks for the tip on lstart, I'll edit it in.
Jan
26
revised How can I kill a process and be sure the PID hasn't been reused
Added warning note about shell=True.
Jan
26
awarded  Yearling
Jan
26
awarded  Teacher
Jan
26
answered How can I kill a process and be sure the PID hasn't been reused
Jan
26
comment How can I kill a process and be sure the PID hasn't been reused
You can save the start time of the original process and, before killing, check that the start time of the process with that pid matches what you saved. The pair pid, start-time is a unique identifier for the processes in Linux.
Oct
6
comment Is w command safe for users?
If you don't want to let bash save those commands in the history just begin the command with a space: $echo 'a' a $ echo 'b' b $!echo echo 'a' a (note that echo 'b' was not recorded in the history).
Aug
4
awarded  Popular Question
Jul
5
comment Who is responsible for the Linux kernel?
@trysis I am Italian. Simpatico is a false friend with sympathetic. It means likable/pleasing/enjoyable/funny. The translation for symmpathetic would be comprensivo. In that sentence it would be probably better to say "everything is compatible with everything else", but simpatico does not carry such a meaning.
Jul
4
comment Who is responsible for the Linux kernel?
"everything is simpatico with everything else" is this an American way of saying? The word simpatico there doesn't really fit. Did you mean "everything goes along/fits well/matches with everything else", or something like that?
Jul
2
awarded  Curious
Jun
26
comment Removing lines that are common to the outputs produced by two commands
No, it isn't related. The decorate-sort-undecorate pattern is used when you want to sort a sequence using a different type of comparison then the one defined by the type of the elements. You create a sequence of pairs with the new "key" as first element and sort that instead, dropping the key afterwards. In this case you aren't doing anything like that. (btw: that pattern is "obsolete", in the sense that you don't have to do that explicitly anymore).
Jun
19
comment Can I “drag” a file into a window without a file manager?
You don't need the second fix. Simply copy the Dragbox directory into the PYTHONPATH somewhere (like in the python2 site-packages, either system or per-user). That line is executed only when dragbox cannot import that package.
Jun
16
awarded  Caucus
Jun
16
awarded  Constituent
May
27
comment Quickest way to rename files, without retyping directory path
Why are you using sudo for moving a file between two directories in your home?
May
5
comment Threads vs (Forked) Processes
"handling multi-thread scheduling is tricky and was frequently done incorrectly" citation needed. Implementing user-space threads isn't a problem. The problem with user-space threads is that if a thread does a blocking syscall all the threads gets blocked. The only way to avoid this is by using system level threads.
Feb
21
comment python vs bc in evaluating 6^6^6
Side note: in python the 6**6**6 expression is actually computed at compile time. However since you are launching the file directly instead of importing it from a module, this shouldn't matter. To see the difference put 10**12345678 into an a.py file and try to import it from the interactive interpreter. Then close the interpreter, restart it and import a again. The first time it should take an noticeable amount of time (because python is compiling the module), while the second time it loads the .pyc, which should be instantaneous,
Dec
3
comment Why is the root directory denoted by a / sign?
Because the empty string would have been a horrible choice!