PureBasic Linux Daemons

Linux specific forum
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

PureBasic Linux Daemons

Post 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
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post 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
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post 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.
Iria
User
User
Posts: 43
Joined: Sat Nov 29, 2003 8:49 pm

Cool

Post by Iria »

Havent had a chance to try this yet will try on Monday.

Thanks :)
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

Hehe, sure thing, let me know what you think. If anyone has idea of other things I should do let me know.
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post 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.
Iria
User
User
Posts: 43
Joined: Sat Nov 29, 2003 8:49 pm

Wroked fine

Post by Iria »

Yeh forked nicely. Naturally you wont get a win32 fork as such :)

Cheers
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post 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:
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post 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?
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

Me, go on .
SPAMINATOR NR.1
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

kake26 wrote:Who thinks its a good idea?
GO KAKE GO!! :)
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

POSIX threads as well? Now, that would be an excellent idea!
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
SkyManager
Enthusiast
Enthusiast
Posts: 339
Joined: Tue Jan 30, 2007 5:47 am
Location: Hong Kong

Post by SkyManager »

These links are broken :
Does anybody have the above files for sharing?
- or -
Does anybody know alternatives to set a daemon thread?
Post Reply