#304523* (?/47) ⚐Flag <FTW> __attribute__((constructor))
<FTW> if used in C, it would be a horrid horrid kludge.
<Pies> FTW: It's a GCC thing
<Pies> It's used for shared objects, when loaded it's supposed to run the constructor, then run the deconstructor when done.
<FTW> ya, I saw the gcc part.
<FTW> so why not just call an init() like done for 15 yrs?
<Pies> Because you can't always
<Pies> The person using the lib might forget to call the deconstructor.
<Pies> This removes the need for the person using the lib to make those calls and potentially eat up gobs of memory.
<FTW> ya, like I said... we've been doing 'init'
<FTW> and 'cleanup' calls in code for 15 yrs with shared libs,
<FTW> and api's.
<FTW> I don't see the need to fuck up C to do so.
<Pies> 1) It's not fucking up C "to do so", it's an extension, you do _not_ have to use it.
<Pies> 2) It means the person using your lib doesn't need to figgure out when to call the deconstructor, this is the important part.
<Pies> If they call abort() the deconstructor can be called and shit can be cleaned up nicely.
<oddballz194> Shit gets cleaned up nicely if you call toilet_flush(), too!
<oddballz194> Or is that flush(toilet)?
<Rolo> fflush(toilet)
<Dfg> someone got shell access to my toilet shell
<Dfg> that fucker is now randomly flushing it
<Dfg> HELP!
<Dfg> how to a restore or revert a toilet account.
<Dfg> The toilet is based on Fedora btw
<whodey> dumbass
<whodey> it's new Toilet().flush()
<Dfg> THAT'S THE FUNCTION!
<Dfg> My Toilet got hacked
<Dfg> anyway to restore it
<Dfg> should I set CHMOD 644 on my toilet seat FS
<Rolo> Yes you should
<Rolo> And quickly!
<Dfg> But if I do 777
<Rolo> Don't question me boy, 544
<Dfg> Okay I will try
<Rolo> It's one hundred less than 644, you're saving KB
<Dfg> DAMMIT
<Dfg> It's giving me an error
<Dfg> file in use something
<Dfg> SOMEONE IS USING MY TOILET!
<Dfg> wtf
<Dfg> damn hackers
<whodey> NEVER EVER EVER type the following
<whodey> cat /etc/toilet |