[fpc-pascal]Nonblocking socket - end of socket

2003-09-16 Thread Balázs Csaba
Title: Üzenet I use non-blocking socket (after initialization i used the fcntl function). Accept does not waiting for client connection, so i need not use threads, I can make it in the main thread. How can I be alerted when the client socket closed from the client side? Can I use textfiles

[fpc-pascal]fork with forked program

2003-09-16 Thread Balázs Csaba
Title: Üzenet I want to use fork to make multithread application for sockets and I would like to fork it to run in dameon mode. Can I fork the forked program? With call fork I get 0 in result in child.   #Tsch : Balázs Csaba  

Re: [fpc-pascal]Nonblocking socket - end of socket

2003-09-16 Thread Michael Van Canneyt
On Tue, 16 Sep 2003, [iso-8859-2] Balázs Csaba wrote: > I use non-blocking socket (after initialization i used the fcntl function). > Accept does not waiting for client connection, so i need not use threads, I > can make it in the main thread. > How can I be alerted when the client socket closed

Re: [fpc-pascal]fork with forked program

2003-09-16 Thread Michael Van Canneyt
On Tue, 16 Sep 2003, [iso-8859-2] Balázs Csaba wrote: > I want to use fork to make multithread application for sockets and I would > like to fork it to run in dameon mode. Multithread is not possible with Fork() > Can I fork the forked program? With call fork I get 0 in result in child. This

Re: [fpc-pascal]fork with forked program

2003-09-16 Thread Matt Emson
Michael, forgive me if I am wrong - I am not a Unix buff - but I was under the impression that forking was a method for creating multithreaded unix apps?!? Everytime you fork() you end up with two seperate processes running concurrently. You differentiate between them by chacking the result given b

Re: [fpc-pascal]fork with forked program

2003-09-16 Thread Michael Van Canneyt
On Tue, 16 Sep 2003, Matt Emson wrote: > Michael, forgive me if I am wrong - I am not a Unix buff - but I was under > the impression that forking was a method for creating multithreaded unix > apps?!? Everytime you fork() you end up with two seperate processes running > concurrently. You differe

Re: [fpc-pascal]several questions

2003-09-16 Thread DONALD PEDDER
> Probably another 18 files have already been opened by the OS (device > drivers etc) I guess that's what's happenning, as when I increased the files it worked. It seemed so extravagent that another 18 files would be open to run a simple pascal program I didn't even think it worth checking! I w

[fpc-pascal]re-direction

2003-09-16 Thread DONALD PEDDER
When I try to re-direct my program output it's not working. I have tried both ">file" and "|more", yet the program continues to display on screen as normal. Is there a known bug with this? In another compiler, I used to have such problems when I was calling the program from a batch file, but

Re: [fpc-pascal]fork with forked program

2003-09-16 Thread Matt Emson
> Multithreaded applications share the same memory space. > Forked applications are truly separate applications, they have a different memory > space. Got you. So the correct term would be 'multiprocess'. I always forget that UNIX considers processes to be seperate to threads. BeOS does things sli

Re: [fpc-pascal]re-direction

2003-09-16 Thread Jonas Maebe
On dinsdag, sep 16, 2003, at 14:51 Europe/Brussels, DONALD PEDDER wrote: When I try to re-direct my program output it's not working. I have tried both ">file" and "|more", yet the program continues to display on screen as normal. Is there a known bug with this? Redirection will not work if you

Re: [fpc-pascal]re-direction

2003-09-16 Thread Michael Van Canneyt
On Tue, 16 Sep 2003, DONALD PEDDER wrote: >When I try to re-direct my program output it's not working. I have > tried both ">file" and "|more", yet the program continues to display on > screen as normal. Is there a known bug with this? If you use the CRT unit, this is normal behaviour. The

Re: [fpc-pascal]fork with forked program

2003-09-16 Thread Jonas Maebe
On dinsdag, sep 16, 2003, at 14:55 Europe/Brussels, Matt Emson wrote: Got you. So the correct term would be 'multiprocess'. I always forget that UNIX considers processes to be seperate to threads. BeOS does things slightly differently. We have the notion of 'teams'. A thread belongs to a 'team'.

Re: [fpc-pascal]Nonblocking socket - end of socket

2003-09-16 Thread Georgi Georgiev
--- Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > > On Tue, 16 Sep 2003, [iso-8859-2] Balázs Csaba > wrote: > > > I use non-blocking socket (after initialization i > used the fcntl function). > > Accept does not waiting for client connection, so > i need not use threads, I > > can make it

Re: [fpc-pascal]fork with forked program

2003-09-16 Thread Marco van de Voort
> On dinsdag, sep 16, 2003, at 14:55 Europe/Brussels, Matt Emson wrote: > > > Got you. So the correct term would be 'multiprocess'. I always forget > > that > > UNIX considers processes to be seperate to threads. BeOS does things > > slightly differently. We have the notion of 'teams'. A thread b

Re: [fpc-pascal]fork with forked program

2003-09-16 Thread Jonas Maebe
On dinsdag, sep 16, 2003, at 15:34 Europe/Brussels, Marco van de Voort wrote: This has nothing to do with unix <-> BeOS. For example, Solaris is definitely Unix and also uses the concept of light weight processes. Light weight processes are a Unix feature. Not all Unixes have light weight process

Re: [fpc-pascal]fork with forked program

2003-09-16 Thread Marco van de Voort
> On dinsdag, sep 16, 2003, at 15:34 Europe/Brussels, Marco van de Voort > wrote: > > >> This has nothing to do with unix <-> BeOS. For example, Solaris is > >> definitely Unix and also uses the concept of light weight processes. > > > > Light weight processes are a Unix feature. > > Not all Uni

[fpc-pascal]Linux USB?

2003-09-16 Thread Paul Aviles
Hello, guys, I am working on a project to control a MatrixOrbital LCD panel and keyboard from FPC and I got it working great with a serial interface, but what about a USB unit? Is it possible to use USB devices directly from FPC? Any samples out there? Thanks -- Paul Aviles http://folding.sta

Re: [fpc-pascal]Linux USB?

2003-09-16 Thread Michael Van Canneyt
On Tue, 16 Sep 2003, Paul Aviles wrote: > > Hello, guys, I am working on a project to control a MatrixOrbital LCD panel > and keyboard from FPC and I got it working great with a serial interface, but > what about a USB unit? Is it possible to use USB devices directly from FPC? USB doesn't requi

Re: [fpc-pascal]Linux USB?

2003-09-16 Thread Sebastian Günther
Paul Aviles schrieb: Hello, guys, I am working on a project to control a MatrixOrbital LCD panel and keyboard from FPC and I got it working great with a serial interface, but what about a USB unit? Is it possible to use USB devices directly from FPC? Normally yes. How you can access a USB devic

Re: [fpc-pascal]Nonblocking socket - end of socket

2003-09-16 Thread Sebastian Günther
Georgi Georgiev schrieb: There is another way, if you use file descriptor calls for non-blocked socket: ... count:=fdRead(socket,data,size); socket_eof:=(count=0) and (LinuxError=0); ... eeehm normally fdread returns -1 for closed sockets, so you can obmit the LinuxError part and just write: soc

[fpc-pascal]CGI and inet Units

2003-09-16 Thread Bob Richards
Greetings all: I am new to this list, and have a question. I have searched the list archives for the answer, but found only dead links :-(( I went to the FPC site, and likewise found only dead links :-(( WHere can I find the units "cgi" "uncgi" and "inet" THey "used" to be under contrib on t

Re: [fpc-pascal]CGI and inet Units

2003-09-16 Thread Michael . VanCanneyt
On 16 Sep 2003, Bob Richards wrote: > Greetings all: > > I am new to this list, and have a question. I have searched the list > archives for the answer, but found only dead links :-(( > > I went to the FPC site, and likewise found only dead links :-(( > > WHere can I find the units "cgi" "uncgi"

Re: [fpc-pascal]re-direction

2003-09-16 Thread DONALD PEDDER
> If you use CRT, remove it, and all will work normally. Ah, okay. I am writing a budget program, so I was using green and red text-colours. It's the first time I've used coloured text. I guess I'll have to create a black and white version in order to save the output. thanks, dp. _

Re: [fpc-pascal]CGI and inet Units

2003-09-16 Thread Bob Richards
On Tue, 2003-09-16 at 15:47, [EMAIL PROTECTED] wrote: > On 16 Sep 2003, Bob Richards wrote: > The uncgi and inet units are distributed with FPC. > > Surprised you don't find any links, becayse the following definitely work: > http://www.freepascal.org/packages/inet.html > http://www.freepascal.or

Re: [fpc-pascal]Nonblocking socket - end of socket

2003-09-16 Thread Georgi Georgiev
--- Sebastian_Günther <[EMAIL PROTECTED]> wrote: > Georgi Georgiev schrieb: > > > There is another way, if you use file descriptor > calls > > for non-blocked socket: > > > > ... > > count:=fdRead(socket,data,size); > > socket_eof:=(count=0) and (LinuxError=0); > > ... > > eeehm normally fdread