« first day (1424 days earlier)      last day (2432 days later) » 

 
7 hours later…
08:25
Morning!
Bit confused, compiling a small program of mine with -std=c99 via GCC suddenly fails to recognize anything from signal.h and I am blocked from compiling.
 
2 hours later…
10:01
signal is posix
or not..
no idea
I guess it is not.
7.14.1.1 The signal function, from open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
yeah, I confuse with sigaction
but if @Micrified use sigaction you should use -std=gnu99
or define _POSIX_C_SOURCE
@Stargateur This works. But what exactly is going on?
when you specify c99, they is no reason to include posix.
10:24
you know what also pisses me off?
his stupid construction going on outside
7:00 -> 16:00
For 5 weeks (planned).
But will probably take them 10
I printed a Bingo board out of construction tools and posted it in my kitchen door for my roomates to play.
"What woke me up today"
10:57
@Micrified well, there is a construction one floor up from my workspace at the moment... and it's already lasting for a month or something...
"Dear Kamiccolo. We're happy to let you know our new business is also finished being constructed. Your patience with us is appreciated. In thanks, we have given you a free voucher for one tap dancing lesson on the new tap dancing floor we've installed above your workspace"/
don't you like road ?
don't you like water ?
don't you like internet ?
Here comes Stargateur trying to guilt me.
well you must choice between don't have these service or have some noise for a period of time
and your neighbor will not agree if you choose the first one ;)
I have no complaints against the workers themselves or the work. But I can complain about the noise being irritating to others. Because well, it is.
I know it has to happen, and I won't complain officially since I understand, but I can still complain about it.
11:07
Are you sure you are not french ?
Also, things are never finished here.
They will be back, mark my words, 3 weeks after it is done. And tear it all up again.
I will complain about that too. It's one of my favorite things to do.
workers have very bad working process, they are sevens but only one can work on data because he lock the mutex and all others look him until he unlock it ;)
1
Q: c++ application fails allocating more hugepages than a certain limit

Fredrik TegenfeldtOverview I have a c++ application that reads large amount of data (~1T). I run it using hugepages (614400 pages at 2M) and this works - until it hits 128G. For testing I created a simple application in c++ that allocates chunks of 2M until it can't. Application is run using: LD_PRELOAD=/usr/l...

11:23
@Micrified ha. That would be... awesome.
 
1 hour later…
12:43
@Feeds BIM, what you gonna do
13:16
I disappointed no one upvote me, they can't handle my genius !
One up vote
 
8 hours later…
21:33
Can a process listen in on another process's "exit" without having to block via waitpid()?
Let me be a bit more precise.
Providing my current process exits normally, can I construct a signal handler within that very process to capture the exit? Providing I can't, can I allow another process to receive a signal when it exits?
21:50
Hrumph.
Looks like waiting is a formal requirement when cleaning up dead children.
(processes, of course)
My goal is actually to be notified when a process is about to exit. So it can't have already terminated. I want to extract some information from it.
Hmm, maybe I can just listen to SIGTERM?
22:06
your are never clear that amazing ;)
Did you want SIGCHLD ?
If any process that exists normally receives SIGTERM, and I can intercept that, then it will do. I'm testing it right now.
that don't make sense
you mean exit ?
Yes.
And of course, receives *prior to exiting.
a terminate process is terminated, it can't receive any signal
only parent receive signal
Can you recompile yourself without -pedantic please?
22:09
A fork. B is his child. B exit. A receive signal SIGCHLD
Of course a dead process cannot receive a signal. It will receive a SIGTERM prior to exiting.
"Providing my current process exits normally, can I construct a signal handler within that very process to capture the exit? Providing I can't, can I allow another process to receive a signal when it exits?
"
Oh wait
you want do something BEFORE exit ?
that really unclear as fuck
Yes. If the parent is notified about the child's termination. Then it's too late.
so wait
you want that A get notice BEFORE B exit ?
I was thinking as I was writing. I don't exactly care who gets what signal. I just need a signal I can catch before B exits.
I'm about to test with SIGTERM.
In B.
22:12
Is B your program ?
and what information do you need ?
Actually waitpid give a lot of information
I need B to do some cleanup work.
It needs it's stack and heap.
ah finnaly after ask 5 times why I finally get it
there are a lot of similar function
The easiest way to get to the real problem is usually asking Why five times. — Gordon Oct 21 '12 at 17:25
Why?
Yes thanks for that. I will try it also.
you want do something before quit ?
atexit() is DESIGN for that
Well I wanted to do it with signals exclusively. I'm going to use atexit as a backup option.
22:18
you want send information from child to parent ?
how child decide it terminate ?
is the parent who decide ?
if I link I suppose you want parent play with stack of his child
Okay. Let me clear it up. When I mentioned the parent process, it was just because I intend to eventually use a parent process, and so if it's not possible for the child to receive a signal before it terminates, but the parent can; then I can accept that option. However, It makes no difference whether the parent or child receives a signal before the child dies. I just want someone to receive it.
you could send the signal in the function you register in atexit
and even wait in the child that the parent send a signal back
> Upon a successful call to one of the
exec(3) functions, all registrations are removed
Whoops wrongcopy paste
> When a child process is created via fork(2), it inherits copies of
its parent's registrations.
This is good.
I will try that I guess.
yes but exec remove them
Exec nukes everythong.
replace entire process core. Nothing can be done about that.
22:23
haha that why I ask you if B was your program
HAVE FUN
What I am trying to do does not work if someone Exec's anyways.
TBH I didn't think about what would happen if someone EXEC's. Kind of annoying.
ptrace will do all you want... but it's a function that I never want to read the documentation xd
that the function valgrind, gdb, and co use
if you want control...
my head hurts.
22:45
ptrace seems too heavy. Will use atexit with fork.
Thanks Stargateur, mon petit chou. :)
XD

« first day (1424 days earlier)      last day (2432 days later) »