delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/06/05/18:44:15

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <f60fe000806051543o67fe6cc0k8c8772c7c3160df@mail.gmail.com>
Date: Thu, 5 Jun 2008 18:43:25 -0400
From: "Mark J. Reed" <markjreed AT mail DOT com>
To: cygwin AT cygwin DOT com, "Pierre A. Humblet" <Pierre DOT Humblet AT ieee DOT org>
Subject: Re: Patch to allow Cron to use non-POSIX shells like Powershell.exe and CMD.exe
In-Reply-To: <2abc9c2d0806051528w6aa5c8f5g6bf946291171d579@mail.gmail.com>
MIME-Version: 1.0
References: <2abc9c2d0806040808s2178885ak5dcf7cd528ea685a AT mail DOT gmail DOT com> <2abc9c2d0806040948l2f6dc1cbjd99bbdaea65cf181 AT mail DOT gmail DOT com> <006701c8c756$1b923260$d50410ac AT wirelessworld DOT airvananet DOT com> <2abc9c2d0806051528w6aa5c8f5g6bf946291171d579 AT mail DOT gmail DOT com>
X-Google-Sender-Auth: 34d046e9a0b32047
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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 AT googlemail DOT 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 DOT Humblet AT ieee DOT 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 AT gmail DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019