public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* What is wrong with the name excel?
@ 2020-04-17 11:10 Gerlach van Beinum
  2020-04-17 17:24 ` Erik Soderquist
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Gerlach van Beinum @ 2020-04-17 11:10 UTC (permalink / raw)
  To: cygwin

I made a program to read a csv file from Excel. I called it excel.c
and it made an executable excel.exe
If irun that executable with:
./excel.exe
nothing happens, i.i. no output.

If I rename it to a.exe it runs OK.

What about this name excel??

My Cygwin version is up-to-date.

-- 
Gerlach van Beinum

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What is wrong with the name excel?
  2020-04-17 11:10 What is wrong with the name excel? Gerlach van Beinum
@ 2020-04-17 17:24 ` Erik Soderquist
  2020-04-17 18:01   ` Eliot Moss
  2020-04-17 17:33 ` Csaba Ráduly
  2020-04-18  0:03 ` Andrey Repin
  2 siblings, 1 reply; 9+ messages in thread
From: Erik Soderquist @ 2020-04-17 17:24 UTC (permalink / raw)
  To: cygwin

On Fri, Apr 17, 2020 at 7:11 AM Gerlach van Beinum wrote:
>
> I made a program to read a csv file from Excel. I called it excel.c
> and it made an executable excel.exe
> If irun that executable with:
> ./excel.exe
> nothing happens, i.i. no output.
>
> If I rename it to a.exe it runs OK.
>
> What about this name excel??

I believe this is actually a Windows issue; Windows recognizes
"excel.exe" as 'a Microsoft package' and intercepts the call to launch
the program, though I would expect Microsoft Excel to launch rather
than 'nothing happening'

I've had this problem before on hosts that did not even have Cygwin
installed when the executable file name matched an existing 'Microsoft
package'

-- Erik
--
"I do not think any of us are truly sane, Caleb. Not even you. Courage
is not sanity. Being willing to die for someone else is not sanity."
... "Love is not sane, nor is faith." ... "If sanity lacks those
things, Caleb, I want no part of it."

-- Alexandria Terri in "Weaving the Wyvern" by Alexis Desiree Thorne

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What is wrong with the name excel?
  2020-04-17 11:10 What is wrong with the name excel? Gerlach van Beinum
  2020-04-17 17:24 ` Erik Soderquist
@ 2020-04-17 17:33 ` Csaba Ráduly
  2020-04-18  0:03 ` Andrey Repin
  2 siblings, 0 replies; 9+ messages in thread
From: Csaba Ráduly @ 2020-04-17 17:33 UTC (permalink / raw)
  To: cygwin

Hi Gerlach,

On 17/04/2020 13:10, Gerlach van Beinum via Cygwin wrote:
> I made a program to read a csv file from Excel. I called it excel.c
> and it made an executable excel.exe
> If irun that executable with:
> ./excel.exe
> nothing happens, i.i. no output.

Try running it under gdb. You should get a better description than "no output".

> 
> If I rename it to a.exe it runs OK.
> 
> What about this name excel??

It's used by a fairly popular application published by a legacy software vendor 
headquartered in Redmond, Washington.

> 
> My Cygwin version is up-to-date.
> 

I believe it when I see it (the output of cygcheck -s -r -v, attached to the email).

Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What is wrong with the name excel?
  2020-04-17 17:24 ` Erik Soderquist
@ 2020-04-17 18:01   ` Eliot Moss
  2020-04-17 18:17     ` Tony Richardson
  2020-04-18  2:33     ` Greywolf
  0 siblings, 2 replies; 9+ messages in thread
From: Eliot Moss @ 2020-04-17 18:01 UTC (permalink / raw)
  To: Erik Soderquist, cygwin

On 4/17/2020 1:24 PM, Erik Soderquist via Cygwin wrote:
> On Fri, Apr 17, 2020 at 7:11 AM Gerlach van Beinum wrote:
>>
>> I made a program to read a csv file from Excel. I called it excel.c
>> and it made an executable excel.exe
>> If irun that executable with:
>> ./excel.exe
>> nothing happens, i.i. no output.
>>
>> If I rename it to a.exe it runs OK.
>>
>> What about this name excel??
> 
> I believe this is actually a Windows issue; Windows recognizes
> "excel.exe" as 'a Microsoft package' and intercepts the call to launch
> the program, though I would expect Microsoft Excel to launch rather
> than 'nothing happening'
> 
> I've had this problem before on hosts that did not even have Cygwin
> installed when the executable file name matched an existing 'Microsoft
> package'

What seems a little odd to me is this.  If I had invoked via:

     excel.exe

I would not be surprised the MS Excel would launch, because it is probably
earlier in the path.  But the OP said he typed:

     ./excel.exe

So I am surprised, given the explicit path.  Which leads me to a background
wondering of whether ./excel.exe has execute permission set.  If not maybe
the search would continue, trying to find something on the path that could
be executed?  That would surprise me a little, but I'd have to go read the
fine print on bash, etc.

Regards - Eliot Moss

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What is wrong with the name excel?
  2020-04-17 18:01   ` Eliot Moss
@ 2020-04-17 18:17     ` Tony Richardson
  2020-04-17 18:26       ` Eliot Moss
  2020-04-18  2:33     ` Greywolf
  1 sibling, 1 reply; 9+ messages in thread
From: Tony Richardson @ 2020-04-17 18:17 UTC (permalink / raw)
  To: moss; +Cc: Erik Soderquist, cygwin

On Fri, Apr 17, 2020 at 1:02 PM Eliot Moss <moss@cs.umass.edu> wrote:

> On 4/17/2020 1:24 PM, Erik Soderquist via Cygwin wrote:
> > On Fri, Apr 17, 2020 at 7:11 AM Gerlach van Beinum wrote:
> >>
> >> I made a program to read a csv file from Excel. I called it excel.c
> >> and it made an executable excel.exe
> >> If irun that executable with:
> >> ./excel.exe
> >> nothing happens, i.i. no output.
> >>
> >> If I rename it to a.exe it runs OK.
> >>
> >> What about this name excel??
> >
> > I believe this is actually a Windows issue; Windows recognizes
> > "excel.exe" as 'a Microsoft package' and intercepts the call to launch
> > the program, though I would expect Microsoft Excel to launch rather
> > than 'nothing happening'
> >
> > I've had this problem before on hosts that did not even have Cygwin
> > installed when the executable file name matched an existing 'Microsoft
> > package'
>
> What seems a little odd to me is this.  If I had invoked via:
>
>      excel.exe
>
> I would not be surprised the MS Excel would launch, because it is probably
> earlier in the path.  But the OP said he typed:
>
>      ./excel.exe
>
> So I am surprised, given the explicit path.  Which leads me to a background
> wondering of whether ./excel.exe has execute permission set.  If not maybe
> the search would continue, trying to find something on the path that could
> be executed?  That would surprise me a little, but I'd have to go read the
> fine print on bash, etc.
>
> Regards - Eliot Moss
>

I am surprised but, I see the same behavior.   No output from an executable
called excel.exe.  winword.exe appears to be another "special" name.

Tony Richardson

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What is wrong with the name excel?
  2020-04-17 18:17     ` Tony Richardson
@ 2020-04-17 18:26       ` Eliot Moss
  2020-04-17 19:00         ` Fergus Daly
  0 siblings, 1 reply; 9+ messages in thread
From: Eliot Moss @ 2020-04-17 18:26 UTC (permalink / raw)
  To: Tony Richardson; +Cc: Erik Soderquist, cygwin


Something that does work is to define a bash function name excel.  Within that
you could invoke an executable called myexcel, etc.  An alias probably works,
too.  Not sure about a symlink (and they come in different flavors).  But
these just paper over that weird special-ness.  Windows is odd ...

Best - Eliot

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: What is wrong with the name excel?
  2020-04-17 18:26       ` Eliot Moss
@ 2020-04-17 19:00         ` Fergus Daly
  0 siblings, 0 replies; 9+ messages in thread
From: Fergus Daly @ 2020-04-17 19:00 UTC (permalink / raw)
  To: cygwin

> Windows is odd ...

To those experiencing problems with
$ excel.exe
or, extraordinarily,
$ ./excel.exe
this question: what is your PATH within Cygwin?
Does it include inherited trajectories to Windows resources?
After experiencing many incongruities and unwelcome coincidences when I did not explicitly exclude default Windows pathnames (such as, typically, C:\Users\{yourname}\AppData\Local\Microsoft\WindowsApps but there are many others), I defined
PATH="$HOME/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/sbin:/usr/sbin"
in /etc/bash.bashrc (or your equivalent).
I just tested re-naming a working executable to "excel" within Cygwin, then called it, and the OS simply enacted the required same working executable with no visit or reference to the identically-named MS Office application; and no blank hang either as some have reported.
Dunno .. .. worth looking at in your own case?
Fergus    


-----Original Message-----
From: Cygwin [mailto:cygwin-bounces@cygwin.com] On Behalf Of Eliot Moss
Sent: 17 April 2020 19:26
To: Tony Richardson
Cc: cygwin
Subject: Re: What is wrong with the name excel?

Something that does work is to define a bash function name excel.  Within that
you could invoke an executable called myexcel, etc.  An alias probably works,
too.  Not sure about a symlink (and they come in different flavors).  But
these just paper over that weird special-ness.  Windows is odd ...

Best - Eliot



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What is wrong with the name excel?
  2020-04-17 11:10 What is wrong with the name excel? Gerlach van Beinum
  2020-04-17 17:24 ` Erik Soderquist
  2020-04-17 17:33 ` Csaba Ráduly
@ 2020-04-18  0:03 ` Andrey Repin
  2 siblings, 0 replies; 9+ messages in thread
From: Andrey Repin @ 2020-04-18  0:03 UTC (permalink / raw)
  To: Gerlach van Beinum, cygwin

Greetings, Gerlach van Beinum!

> I made a program to read a csv file from Excel. I called it excel.c
> and it made an executable excel.exe
> If irun that executable with:
> ./excel.exe
> nothing happens, i.i. no output.

> If I rename it to a.exe it runs OK.

> What about this name excel??

> My Cygwin version is up-to-date.

Unable to repro'd.
Win7 and Win10 1909.


-- 
With best regards,
Andrey Repin
Saturday, April 18, 2020 3:01:28

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: What is wrong with the name excel?
  2020-04-17 18:01   ` Eliot Moss
  2020-04-17 18:17     ` Tony Richardson
@ 2020-04-18  2:33     ` Greywolf
  1 sibling, 0 replies; 9+ messages in thread
From: Greywolf @ 2020-04-18  2:33 UTC (permalink / raw)
  To: moss, Erik Soderquist, cygwin

On 4/17/2020 11:01, Eliot Moss wrote:
> On 4/17/2020 1:24 PM, Erik Soderquist via Cygwin wrote:
> What seems a little odd to me is this.  If I had invoked via:
> 
>     excel.exe
> 
> I would not be surprised the MS Excel would launch, because it is probably
> earlier in the path.  But the OP said he typed:
> 
>     ./excel.exe
> 
> So I am surprised, given the explicit path.  Which leads me to a background
> wondering of whether ./excel.exe has execute permission set.  If not maybe
> the search would continue, trying to find something on the path that could
> be executed?  That would surprise me a little, but I'd have to go read the
> fine print on bash, etc.

If it didn't find it in the path at all, one expects (in a reasonable
environment) that the complaint "Command not found" would issue.

> 
> Regards - Eliot Moss
> -- 
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-18  2:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 11:10 What is wrong with the name excel? Gerlach van Beinum
2020-04-17 17:24 ` Erik Soderquist
2020-04-17 18:01   ` Eliot Moss
2020-04-17 18:17     ` Tony Richardson
2020-04-17 18:26       ` Eliot Moss
2020-04-17 19:00         ` Fergus Daly
2020-04-18  2:33     ` Greywolf
2020-04-17 17:33 ` Csaba Ráduly
2020-04-18  0:03 ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).