Hi there,
I'd like to contribute the following modules to Pike:
. A non blocking SMTP/LMTP server API. I borrowed some code from a SMTP server for Roxen copyright Mike Knott, David Hedbor and On The Verge these parts are protected under the GPL version 2. I'd like to know if the Pike team and them agree or not for the addition. For now I did not really test the SMTP server facing the real Internet world. However I use the LMTP server (which inherit the SMTP server) for some months now on a production server behind a Postfix server.
. A non blocking process starter with the features of Process.create_process without the need to use the wait() of Process.spawn (it works with callback functions).
On Fri, Sep 19, 2003 at 11:49:24PM +0200, David Gourdelier wrote:
I'd like to contribute the following modules to Pike: . A non blocking SMTP/LMTP server API. I borrowed some code from a SMTP server for Roxen copyright Mike Knott, David Hedbor and On The Verge these parts are protected under the GPL version 2. I'd like to know if the Pike team and them agree or not for the addition.
on the verge does not exist enymore. nobody who would know what this is about is still with the company that on the verge was a part of. as such there is no chance that you will find anyone who can change the licence let alone sign over the rights.
the way copyright is handled in pike may work with individuals but i doubt its any good with corporations, because there is no way of knowing that the person granting the rights has any authority to do so.
greetings, martin.
On Fri, Sep 19, 2003 at 11:49:24PM +0200, David Gourdelier wrote:
I'd like to contribute the following modules to Pike: . A non blocking SMTP/LMTP server API. I borrowed some code from a SMTP server for Roxen copyright Mike Knott, David Hedbor and On The Verge these parts are protected under the GPL version 2. I'd like to know if the Pike team and them agree or not for the addition.
on the verge does not exist enymore. nobody who would know what this is about is still with the company that on the verge was a part of. as such there is no chance that you will find anyone who can change the licence let alone sign over the rights.
The solution is then to change the code but the part is so small that I don't know how to change it. Morever as it's adding header on the top of mail, there are not a lot of ways to add it to fitfull with the standards.
On Sat, Sep 20, 2003 at 12:30:54AM +0200, David Gourdelier wrote:
The solution is then to change the code but the part is so small that I don't know how to change it.
can you identify which part of the code is from on the verge? if it is small enough (a few lines) then 'fair use' rules will apply
otherwise, i am sure someone can come up with rewrite suggestions
greetings, martin.
It's pretty much intermixed I'd say. Meaning if it's an evolution of that code, it will be very hard to separate. Should also note that the code I wrote for it, was done as an employer for Cyberhosting which later was bought by OTV. Thus I'm guessing ALL the originating code is copyright OTV one way or another.
/ David Hedbor
Previous text:
2003-10-08 14:11: Subject: Re: Contribution
On Sat, Sep 20, 2003 at 12:30:54AM +0200, David Gourdelier wrote:
The solution is then to change the code but the part is so small that I don't know how to change it.
can you identify which part of the code is from on the verge? if it is small enough (a few lines) then 'fair use' rules will apply
otherwise, i am sure someone can come up with rewrite suggestions
greetings, martin.
/ Brevbäraren
Cool (regardles of what happens).
As you actually use the code right now I have to ask - would you care to add some documentation?
/ Peter Lundqvist (disjunkt)
Previous text:
2003-09-19 23:50: Subject: Contribution
Hi there,
I'd like to contribute the following modules to Pike:
. A non blocking SMTP/LMTP server API. I borrowed some code from a SMTP server for Roxen copyright Mike Knott, David Hedbor and On The Verge these parts are protected under the GPL version 2. I'd like to know if the Pike team and them agree or not for the addition. For now I did not really test the SMTP server facing the real Internet world. However I use the LMTP server (which inherit the SMTP server) for some months now on a production server behind a Postfix server.
. A non blocking process starter with the features of Process.create_process without the need to use the wait() of Process.spawn (it works with callback functions).
-- David Gourdelier
/ Brevbäraren
Cool (regardles of what happens).
As you actually use the code right now I have to ask - would you care to add some documentation?
It depends on what type of documentation you'd like. At the top of the files there are already some examples on howto use it and the public functions are documented (Ok it's not with Pike doc format).
Nice! What is LMTP?
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-19 23:50: Subject: Contribution
Hi there,
I'd like to contribute the following modules to Pike:
. A non blocking SMTP/LMTP server API. I borrowed some code from a SMTP server for Roxen copyright Mike Knott, David Hedbor and On The Verge these parts are protected under the GPL version 2. I'd like to know if the Pike team and them agree or not for the addition. For now I did not really test the SMTP server facing the real Internet world. However I use the LMTP server (which inherit the SMTP server) for some months now on a production server behind a Postfix server.
. A non blocking process starter with the features of Process.create_process without the need to use the wait() of Process.spawn (it works with callback functions).
-- David Gourdelier
/ Brevbäraren
There is already a Process.Process that add some (extremly) limited bells and whistels to create_process. You could extend that.
/ Martin Nilsson (saturator)
Previous text:
2003-09-20 00:39: Subject: Contribution
Nice! What is LMTP?
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
/ Martin Stjernholm, Roxen IS
Ah, yes, another thing:
o What happens when the process writes a lot of data, so that the stdout pipe gets full? I suspect it will hang until the time out, whereas it could finish successfully had there only been someone to read the data from the pipe.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 00:39: Subject: Contribution
Nice! What is LMTP?
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
/ Martin Stjernholm, Roxen IS
Hello,
I modified it so that it can be used as a wrapper if you don't provide the callback functions in the mapping. Also it doesn't override anything in the modifiers mapping but you have to provide the fds (see test.pike for an example).
However it has the bug you pointed to but I don't see any solutions. One solution would have been to have something like Thread()->timeout() in Pike (which would be very usefull by the way).
/ David Gourdelier
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Ah, yes, another thing:
o What happens when the process writes a lot of data, so that the stdout pipe gets full? I suspect it will hang until the time out, whereas it could finish successfully had there only been someone to read the data from the pipe.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 00:39: Subject: Contribution
Nice! What is LMTP?
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
/ Martin Stjernholm, Roxen IS
I thought it to be useful that it automatically collected stdout. Perhaps it could do that if no stdout argument already is in the mapping?
Regardless of whether it's the user or the class itself that does it, the pipe full problem is solved by providing a read callback. The callback stuff only works if there's a backend running anyway.
As for adding this and your other contributions, do you have cvs access? A good place for the create_process extras would be the Process.Process class, like Nilsson said.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 21:32: Subject: Re: Contribution
Hello,
I modified it so that it can be used as a wrapper if you don't provide the callback functions in the mapping. Also it doesn't override anything in the modifiers mapping but you have to provide the fds (see test.pike for an example).
However it has the bug you pointed to but I don't see any solutions. One solution would have been to have something like Thread()->timeout() in Pike (which would be very usefull by the way).
/ David Gourdelier
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Ah, yes, another thing:
o What happens when the process writes a lot of data, so that the stdout pipe gets full? I suspect it will hang until the time out, whereas it could finish successfully had there only been someone to read the data from the pipe.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 00:39: Subject: Contribution
Nice! What is LMTP?
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
/ Martin Stjernholm, Roxen IS
-- -- David Gourdelier
/ Brevbäraren
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
I thought it to be useful that it automatically collected stdout. Perhaps it could do that if no stdout argument already is in the mapping?
Sure.
Regardless of whether it's the user or the class itself that does it, the pipe full problem is solved by providing a read callback. The callback stuff only works if there's a backend running anyway.
I don't get it. Why the read callback should fix the pipe full problem ?
As for adding this and your other contributions, do you have cvs access? A good place for the create_process extras would be the Process.Process class, like Nilsson said.
No I don't have CVS access.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 21:32: Subject: Re: Contribution
Hello,
I modified it so that it can be used as a wrapper if you don't provide the callback functions in the mapping. Also it doesn't override anything in the modifiers mapping but you have to provide the fds (see test.pike for an example).
However it has the bug you pointed to but I don't see any solutions. One solution would have been to have something like Thread()->timeout() in Pike (which would be very usefull by the way).
/ David Gourdelier
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Ah, yes, another thing:
o What happens when the process writes a lot of data, so that the stdout pipe gets full? I suspect it will hang until the time out, whereas it could finish successfully had there only been someone to read the data from the pipe.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 00:39: Subject: Contribution
Nice! What is LMTP?
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
/ Martin Stjernholm, Roxen IS
-- -- David Gourdelier
/ Brevbäraren
I don't get it. Why the read callback should fix the pipe full problem ?
If you set a read callback on your end of the stdout pipe it'd get called when there's data on the pipe, wouldn't it? Then it can just collect the data in (preferably) a String.Buffer object.
No I don't have CVS access.
Shouldn't be a problem to fix (unless possibly if you must have a special deal regarding the copyright). Jhs?
A side issue: Du you think you could shorten the quoted parts of the messages when you respond? I, and probably many other here, like short messages with a minimum of quoting. The mail gateway automatically tacks on the commented message when it's written in LysKOM but unfortunately it doesn't do the reverse for mail messages. So when you respond without cutting away that we essentially get the whole thread in every other message.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-21 14:56: Subject: Re: Contribution
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
I thought it to be useful that it automatically collected stdout. Perhaps it could do that if no stdout argument already is in the mapping?
Sure.
Regardless of whether it's the user or the class itself that does it, the pipe full problem is solved by providing a read callback. The callback stuff only works if there's a backend running anyway.
I don't get it. Why the read callback should fix the pipe full problem ?
As for adding this and your other contributions, do you have cvs access? A good place for the create_process extras would be the Process.Process class, like Nilsson said.
No I don't have CVS access.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 21:32: Subject: Re: Contribution
Hello,
I modified it so that it can be used as a wrapper if you don't provide the callback functions in the mapping. Also it doesn't override anything in the modifiers mapping but you have to provide the fds (see test.pike for an example).
However it has the bug you pointed to but I don't see any solutions. One solution would have been to have something like Thread()->timeout() in Pike (which would be very usefull by the way).
/ David Gourdelier
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Ah, yes, another thing:
o What happens when the process writes a lot of data, so that the stdout pipe gets full? I suspect it will hang until the time out, whereas it could finish successfully had there only been someone to read the data from the pipe.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 00:39: Subject: Contribution
Nice! What is LMTP?
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
/ Martin Stjernholm, Roxen IS
-- -- David Gourdelier
/ Brevbäraren
/ Brevbäraren
Btw, it's not necessary to check that a call out exists before passing it to remove_call_out. That function actually accepts anything.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 21:32: Subject: Bilaga (_Process.pmod) till: Re: Contribution
/*
A non blocking Process starter for Pike
19 September 2003 vida@caudium.net David Gourdelier
*/
class create_process { inherit Process.create_process; private function cb; private function timeout_cb;
// start a process. It inherits Process.create_process // command_args and modifiers are the same as in create_process // timeout is the timeout in seconds after which we will kill the process // and call back the timeout_callback function // calllback function is called when process has finished void create(array(string) command_args, void|mapping modifiers) { if(modifiers->read_callback && functionp(modifiers->read_callback)) { int timeout = 15; cb = modifiers->read_callback; if(modifiers->timeout_callback) timeout_cb = modifiers->timeout_callback; ::create(command_args, modifiers); call_out(watcher, 0.1); if(timeout_cb && functionp(timeout_cb)) { if(modifiers->timeout) timeout = modifiers->timeout; call_out(killer, timeout); } } else ::create(command_args, modifiers); }
void destroy() { if(!zero_type(find_call_out(watcher))) remove_call_out(watcher); if(!zero_type(find_call_out(killer))) remove_call_out(killer); }
private void watcher() { // it was another sigchld but not the one from our process if(::status() == 0) { call_out(watcher, 0.1); } else { /* process has finished */ if(!zero_type(find_call_out(killer))) remove_call_out(killer); if(cb) cb(); } }
private void killer() { remove_call_out(watcher); #if constant(kill) ::kill(signum("SIGKILL")); #endif if(timeout_cb) timeout_cb(); } };
/ Brevbäraren
If you try to remove a non-exisiting call_out it returns -1 with zero type 1. Strange.
/ Martin Nilsson (saturator)
Previous text:
2003-09-21 00:04: Subject: Bilaga (_Process.pmod) till: Re: Contribution
Btw, it's not necessary to check that a call out exists before passing it to remove_call_out. That function actually accepts anything.
/ Martin Stjernholm, Roxen IS
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Nice! What is LMTP?
Quoting RFC 2033 (Local Mail Transfert Protocol):
" SMTP [SMTP] [HOST-REQ] and its service extensions [ESMTP] provide a mechanism for transferring mail reliably and efficiently. The design of the SMTP protocol effectively requires the server to manage a mail delivery queue.
In some limited circumstances, outside the area of mail exchange between independent hosts on public networks, it is desirable to implement a system where a mail receiver does not manage a queue. This document describes the LMTP protocol for transporting mail into such systems.
Although LMTP is an alternative protocol to ESMTP, it uses (with a few changes) the syntax and semantics of ESMTP. This design permits LMTP to utilize the extensions defined for ESMTP. LMTP should be used only by specific prior arrangement and configuration, and it MUST NOT be used on TCP port 25."
So basicaly it's ESMTP. LMTP is between the output of the SMTP receiving server and the mail spool. The good thing is that you get better performances writing mail with Postfix for example (you don't need to start a process each time you receive a mail). And with this API you have a total control of where to write the mail, you can even write your own mail storage system and route the emails on each user's directory as you want.
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
Good idea.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Then it has to be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
I guessed some programs need a stdin.
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
Indeed I won't modify the C code.
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
Yep, thanks.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
Yes, my mistake, it's here from an old version and I forgot to remove it.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-19 23:50: Subject: Contribution
Hi there,
I'd like to contribute the following modules to Pike:
. A non blocking SMTP/LMTP server API. I borrowed some code from a SMTP server for Roxen copyright Mike Knott, David Hedbor and On The Verge these parts are protected under the GPL version 2. I'd like to know if the Pike team and them agree or not for the addition. For now I did not really test the SMTP server facing the real Internet world. However I use the LMTP server (which inherit the SMTP server) for some months now on a production server behind a Postfix server.
. A non blocking process starter with the features of Process.create_process without the need to use the wait() of Process.spawn (it works with callback functions).
-- David Gourdelier
/ Brevbäraren
I guessed some programs need a stdin.
The caller knows that, so it's up to him to fix one, isn't it? If a program uses stdin it's not unlikely that it requires some input on it too, and then the hardcoded stdin pipe would get in the way.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 01:21: Subject: Re: Contribution
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Nice! What is LMTP?
Quoting RFC 2033 (Local Mail Transfert Protocol):
" SMTP [SMTP] [HOST-REQ] and its service extensions [ESMTP] provide a mechanism for transferring mail reliably and efficiently. The design of the SMTP protocol effectively requires the server to manage a mail delivery queue.
In some limited circumstances, outside the area of mail exchange between independent hosts on public networks, it is desirable to implement a system where a mail receiver does not manage a queue. This document describes the LMTP protocol for transporting mail into such systems.
Although LMTP is an alternative protocol to ESMTP, it uses (with a few changes) the syntax and semantics of ESMTP. This design permits LMTP to utilize the extensions defined for ESMTP. LMTP should be used only by specific prior arrangement and configuration, and it MUST NOT be used on TCP port 25."
So basicaly it's ESMTP. LMTP is between the output of the SMTP receiving server and the mail spool. The good thing is that you get better performances writing mail with Postfix for example (you don't need to start a process each time you receive a mail). And with this API you have a total control of where to write the mail, you can even write your own mail storage system and route the emails on each user's directory as you want.
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
Good idea.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Then it has to be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
I guessed some programs need a stdin.
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
Indeed I won't modify the C code.
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
Yep, thanks.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
Yes, my mistake, it's here from an old version and I forgot to remove it.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-19 23:50: Subject: Contribution
Hi there,
I'd like to contribute the following modules to Pike:
. A non blocking SMTP/LMTP server API. I borrowed some code from a SMTP server for Roxen copyright Mike Knott, David Hedbor and On The Verge these parts are protected under the GPL version 2. I'd like to know if the Pike team and them agree or not for the addition. For now I did not really test the SMTP server facing the real Internet world. However I use the LMTP server (which inherit the SMTP server) for some months now on a production server behind a Postfix server.
. A non blocking process starter with the features of Process.create_process without the need to use the wait() of Process.spawn (it works with callback functions).
-- David Gourdelier
/ Brevbäraren
-- -- David Gourdelier
/ Brevbäraren
I certainly have no issues with re-licensing but does anyone know how to even get hold of Mike Knott? Even though that might be hard, the biggest problem definitely lies with On The Verge, which as Martin pointed out, doesn't exist (at least as it once existed).
/ David Hedbor
Previous text:
2003-09-20 01:31: Subject: Re: Contribution
I guessed some programs need a stdin.
The caller knows that, so it's up to him to fix one, isn't it? If a program uses stdin it's not unlikely that it requires some input on it too, and then the hardcoded stdin pipe would get in the way.
/ Martin Stjernholm, Roxen IS
. A non blocking SMTP/LMTP server API. I borrowed some code from a SMTP server for Roxen copyright Mike Knott, David Hedbor and On The Verge these parts are protected under the GPL version 2. I'd like to know if the Pike team and them agree or not for the addition. For now I did not really test the SMTP server facing the real Internet world. However I use the LMTP server (which inherit the SMTP server) for some months now on a production server behind a Postfix server.
This sounds very nice. However, if you can't get the orignal authors to sign over the copyright, or otherwise open up the licensing, we can't put it the main Pike repository. GPL is not good enough since we want to distribute Pike under MPL and LGPL as well. Then the best we could do is put it the pike-modules repository.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-09-19 23:50: Subject: Contribution
Hi there,
I'd like to contribute the following modules to Pike:
. A non blocking SMTP/LMTP server API. I borrowed some code from a SMTP server for Roxen copyright Mike Knott, David Hedbor and On The Verge these parts are protected under the GPL version 2. I'd like to know if the Pike team and them agree or not for the addition. For now I did not really test the SMTP server facing the real Internet world. However I use the LMTP server (which inherit the SMTP server) for some months now on a production server behind a Postfix server.
. A non blocking process starter with the features of Process.create_process without the need to use the wait() of Process.spawn (it works with callback functions).
-- David Gourdelier
/ Brevbäraren
pike-devel@lists.lysator.liu.se