This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to allow Cron to use non-POSIX shells like Powershell.exe and CMD.exe


The sh process is not "extra" since it's replaced by the powershell
process, right? Unless "exec" works differently in Cygwin, which is
entirely possible....

As a solution it seems reasonable to me... I'd much rather use a
configuration-based change than worry about maintaining a patch.  But
that's just me.




On 6/5/08, Blair Sutton <blairuk@googlemail.com> wrote:
> I'm not sure if that's a very good solution. It spawns an unnecessary
> bourne shell process on each new cron job.
>
> Don't worry if you don't want to make the change. I will maintain my
> own separate branch and perhaps post the patch with some instructions
> somewhere online where other people may find it useful.
>
> Best regards
> Blair
>
> On 6/5/08, Pierre A. Humblet <Pierre.Humblet@ieee.org> wrote:
>> ----- Original Message -----
>> From: "Blair Sutton" <>
>> To: <cygwin>
>> Sent: Wednesday, June 04, 2008 12:48 PM
>> Subject: Patch to allow Cron to use non-POSIX shells like Powershell.exe
>> and
>> CMD.exe
>>
>>
>> | Hi
>> |
>> | This is a very simple patch for Cron to allow one to use a shell like
>> | powershell or cmd. I've done some testing and it appears to work well.
>> |
>> | I simply introduce a new environment variable called SHELLSWICTH that
>> | defaults to "-c" if not used. Otherwise, one can set it to "/c" or
>> | "-Command" for Windows shells.
>> |
>>
>> ************
>> Hi Blair,
>>
>> I maintain cron for cygwin, thanks for your contribution.
>> There are other simple ways to achieve your goals,
>> without changing cron.
>>
>> For example SHELL could be /some/path/sh2powershell
>> and sh2powershell be a sh script such as
>> #! /bin/sh
>> shift
>> exec powershell -Command "$*"
>>
>> Wouldn't that work as well for you?
>>
>> Pierre
>>
>
> --
> Sent from Google Mail for mobile | mobile.google.com
>
> +44 7943 865 125
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>

-- 
Sent from Gmail for mobile | mobile.google.com

Mark J. Reed <markjreed@gmail.com>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]