Reputation
836
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
6 8
Newest
 Yearling
Impact
~45k people reached

  • 0 posts edited
  • 0 helpful flags
  • 289 votes cast
Jul
11
comment Why are UNIX/POSIX system call namings so illegible?
@Voo: Well, you could make the point that system functions should have shorter names than functions specific to a single program. But maybe I have been braindamaged forever by Perl (not that I care much, I started coding in BASIC, so I was already braindamaged, according to some people).
Jun
27
comment Extract only chinese characters
The Han script includes the blocks: 2E80..2E99 2E9B..2EF3 2F00..2FD5 3005 3007 3021..3029 3038..303A 303B 3400..4DB5 4E00..9FCB F900..FA2D FA30..FA6D FA70..FAD9 20000..2A6D6 2A700..2B734 2F800..2FA1D, so I really would recommend using scripts instead of blocks.
Jun
27
comment Extract only chinese characters
Since you're recommending perl, wouldn't you think perl -CAS -pe 's/\P{Script: Han}//g to be better (it iincludes more than 75000 characters)?
Dec
10
awarded  Yearling
Oct
2
comment Is there any UNIX variant on which a child process dies with its parent?
@o11c: AFAIK, what systemd does is set itself as a "child subreaper" (prctl(...PR_SET_CHILD_SUBREAPER...)), so it can be pid!=1 and still know about orphaned descendants.
Oct
2
comment Is there any UNIX variant on which a child process dies with its parent?
There's also prctl(...PR_SET_PDEATHSIG...) to request to receive a signal when the parent dies.
Oct
2
comment Is there any UNIX variant on which a child process dies with its parent?
From setpgid(2) manpage: If a session has a controlling terminal, and the CLOCAL flag for that terminal is not set, and a terminal hangup occurs, then the session leader is sent a SIGHUP. If the session leader exits, then a SIGHUP signal will also be sent to each process in the foreground process group of the controlling terminal.
Sep
3
comment Tracing executable without read permissions
The EPERM seems to come from get_dumpable() (used also to check whether core dumping is allowed, thus "dumpable") called from __ptrace_may_access() called from ptrace_attach() on kernel/ptrace.c.
Jun
27
comment Testing the Success of a Congestion Algorithm
I have enough imaginary Internet points (see my stackoverflow account), I'm not sure of what exactly you want to test there, and it's Friday, so I don't trust my ability to write more than two consecutive coherent sentences.
Jun
27
comment Testing the Success of a Congestion Algorithm
Right now, you can probably write a better answer than me, since you know better which application metrics you can access (that's why I said ideally, since I don't expect all TCP applications to expose relevant metrics).
Jun
27
comment Testing the Success of a Congestion Algorithm
I'm not sure. I think a long running non-fair high-throughput connection could increase the latency of short-lived connections, while not needing to recover from "lending" bandwidth to those other connections.
Jun
27
comment Testing the Success of a Congestion Algorithm
Increased througput for a connection can mean increased latency for the rest of the connections.
Jun
27
comment Testing the Success of a Congestion Algorithm
TCP connections finishing earlier indicates higher throughput, not lower latency. Ideally, you could get latency and/or throughput figures from your TCP-using applications (some games may show latency figures, http/ftp downloads show throughput,...)
Jun
17
awarded  Constituent
Jun
9
awarded  Caucus
Jun
2
comment Any way in Bash to write to a file every X seconds without closing it?
@ChrisDown: in this case, it protects against hardware lockups, and some kinds of kernel lockups (on SMP you can have a CPU locked up and still be running on the others).
Dec
18
comment The meaning of output of pmap
0x601000 is the data segment. It contains .data, .bss and can be extended via brk(). [anon] indicates non-file backed memory (so backed by swap), obtained via mmap(). dlmalloc uses brk() for allocations smaller than ~64Kb IIRC, and mmap() for larger allocations. The heap is everything allocated by malloc, both the extended part of the data segment, and the mmap()-based allocations.
Dec
17
comment Can the empty spaces/background in a terminal be replaced with a random(but pretty) pattern of ASCII characters?
@illuminÉ: well, my first comment was just to point out that bash will under some circumstances clear part of your background. E.g: fill the screen with Ms, go to the middle of it, and then write a char and backspace it: for i in $(seq 1 $(expr $(tput lines) \* $(tput cols))); do echo -n M; done; tput cup 15 1, then at the prompt type a char and backspace it.
Dec
17
comment Can the empty spaces/background in a terminal be replaced with a random(but pretty) pattern of ASCII characters?
@illuminÉ: \33 is ESC, the escape character (decimal 27, hex \x1f). The sequence ESC[ is 7-bit CSI (8-bit CSI is \x9f), the Control Sequence Introducer, which introduces many control sequences. In particular, CSI K is Erase in Line (EL, clr_eol), which by default erases from the current position to the end of the line. CSI 1 K erases to the left, and CSI 2K erases the whole line. You may want to skim into terminfo(5), console_codes(4), and/or /usr/share/doc/xterm-*/ctlseqs.*
Dec
16
comment Can the empty spaces/background in a terminal be replaced with a random(but pretty) pattern of ASCII characters?
zsh apparently does a clr_eos (clears from the current position to the end of the screen) on every prompt.