Page 1 of 1

PureBasic Linux Daemons

Posted: Sun Feb 01, 2004 5:27 pm
by kake26
Hi all,
If you use PB under linux you've proably asked you're sellf why can't I make a daemon. The answer is simple PB isn't that far under linux. However, I have good news thanks to my latest bit of genious you can make linux PB daemons. I built a library with FPC(FreePascal Compiler) that enables a compiled PB app to do just that. I have posted a compiled version of the library as well as a PB skeleton to us it.

http://r-t-f-m.com/files/linux/source/p ... montest.pb <-- the PB code
http://r-t-f-m.com/files/linux/source/f ... cpbdlib.so <--- the compiled Lib

Please post any questions,comments, or bug reports here, or better yet e-mail them to iso196@yahoo.com

Posted: Sun Feb 01, 2004 7:09 pm
by kake26
One more thing the library source is avail too below is the link.

http://r-t-f-m.com/files/linux/source/f ... pbdlib.pas <-- Library source

Posted: Sun Feb 01, 2004 7:15 pm
by kake26
One last little note, the code is public domain, aka whatever you wish to do with it is fine with me. The second you use the code anything and everything that happens as a result of its us e is your responsibility. I give no warrenty what so ever. I just did all this to give back to the PB community. All I can hope for is that you find it useful.

Cool

Posted: Sun Feb 01, 2004 8:32 pm
by Iria
Havent had a chance to try this yet will try on Monday.

Thanks :)

Posted: Mon Feb 02, 2004 12:22 am
by kake26
Hehe, sure thing, let me know what you think. If anyone has idea of other things I should do let me know.

Posted: Mon Feb 02, 2004 3:27 pm
by kake26
I've started to us the daemon library runtime in other PB, net related of course. So far its working just fine. FYI the library is made with FPC(Free Pascal Compiler). The library should work fine on any linux/unix platform. I'm gonna go as far as saying you can even compile it under win32, but it won't work under win32 for obvious reasons. If anyone has ideas,comments or other things they wish to tell me by all means post them here, or e-mail them ito me, see previous posts for e-mail.

Wroked fine

Posted: Mon Feb 02, 2004 11:25 pm
by Iria
Yeh forked nicely. Naturally you wont get a win32 fork as such :)

Cheers

Posted: Tue Feb 03, 2004 11:05 pm
by kake26
:) It was really just a hack for PB cause I needed to be able to write daemons. I'm using it in my fileserver crap I've made in PB, which no I'm not sharing just yet. Good to know it works thanks! :wink:

Posted: Thu Feb 05, 2004 1:50 am
by kake26
I was thinking of porting more stuff in the same manner maybe get a decent POSIX runtime built. In a nut shell take all the stuff I have access to in FPC and make a lib so it can be used from PB, to fill in some of the linux gaps it has. Who thinks its a good idea?

Posted: Thu Feb 05, 2004 9:57 am
by Rings
Me, go on .

Posted: Tue Feb 24, 2004 1:52 am
by Beach
kake26 wrote:Who thinks its a good idea?
GO KAKE GO!! :)

Posted: Thu Feb 26, 2004 12:02 am
by dell_jockey
POSIX threads as well? Now, that would be an excellent idea!

Posted: Thu Mar 29, 2007 12:49 am
by SkyManager
These links are broken :
Does anybody have the above files for sharing?
- or -
Does anybody know alternatives to set a daemon thread?