I am porting from Digital Unix to Linux (RHEL 4), and am seeing a
difference in the return value of glob().
Given a non-existant directory "/tmp/a", and the following line of
code:
result = glob("/tmp/a", GLOB_ERR, NULL, &globInfo);
- result is set to GLOB_NOMATCH on both platforms.
However, if the first parameter is changed to "/tmp/a/*", i.e.
searching for files within the directory, the return value on Digital
Unix is still GLOB_NOMATCH, but on RHEL it is GLOB_ABORTED (2)
Which is correct?
(I have seen the man page, and some Google matches mentioning earlier
Linux bugs, but am still confused!)
TIA
Mark 8 2360
On 5 Jun, 14:45, mark.berg...@th ales-is.com wrote:
I am porting from Digital Unix to Linux (RHEL 4), and am seeing a
difference in the return value of glob().
Given a non-existant directory "/tmp/a", and the following line of
code:
result = glob("/tmp/a", GLOB_ERR, NULL, &globInfo);
- result is set to GLOB_NOMATCH on both platforms.
However, if the first parameter is changed to "/tmp/a/*", i.e.
searching for files within the directory, the return value on Digital
Unix is still GLOB_NOMATCH, but on RHEL it is GLOB_ABORTED (2)
Which is correct?
(I have seen the man page, and some Google matches mentioning earlier
Linux bugs, but am still confused!)
This is probably better addressed in comp.unix.progr ammer, as
comp.lang.c tends not to concern itself with behaviour outside the C
standards.
However, http://www.opengroup.org/onlinepubs/...ions/glob.html
(the relevant part of the relevant standard) was easy to find and
suggests to me that the RHEL behaviour is correct. ma**********@th ales-is.com wrote:
>
I am porting from Digital Unix to Linux (RHEL 4), and am seeing a
difference in the return value of glob().
Given a non-existant directory "/tmp/a", and the following line of
code:
result = glob("/tmp/a", GLOB_ERR, NULL, &globInfo);
- result is set to GLOB_NOMATCH on both platforms.
However, if the first parameter is changed to "/tmp/a/*", i.e.
searching for files within the directory, the return value on Digital
Unix is still GLOB_NOMATCH, but on RHEL it is GLOB_ABORTED (2)
Which is correct?
(I have seen the man page, and some Google matches mentioning earlier
Linux bugs, but am still confused!)
Who knows. You didn't post the code for glob().
--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com
On 2007-06-05, CBFalconer wrote:
ma**********@th ales-is.com wrote:
>> I am porting from Digital Unix to Linux (RHEL 4), and am seeing a difference in the return value of glob(). Given a non-existant directory "/tmp/a", and the following line of code: result = glob("/tmp/a", GLOB_ERR, NULL, &globInfo); - result is set to GLOB_NOMATCH on both platforms.
However, if the first parameter is changed to "/tmp/a/*", i.e. searching for files within the directory, the return value on Digital Unix is still GLOB_NOMATCH, but on RHEL it is GLOB_ABORTED (2)
Which is correct? (I have seen the man page, and some Google matches mentioning earlier Linux bugs, but am still confused!)
Who knows. You didn't post the code for glob().
man glob:
GLOB(3) Linux Programmer's Manual GLOB(3)
NAME
glob, globfree - find pathnames matching a pattern, free memory
from glob()
--
Chris F.A. Johnson, author | <http://cfaj.freeshell. org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
"Chris F.A. Johnson" wrote:
On 2007-06-05, CBFalconer wrote:
>ma**********@th ales-is.com wrote:
>>> I am porting from Digital Unix to Linux (RHEL 4), and am seeing a difference in the return value of glob(). Given a non-existant directory "/tmp/a", and the following line of code: result = glob("/tmp/a", GLOB_ERR, NULL, &globInfo); - result is set to GLOB_NOMATCH on both platforms.
However, if the first parameter is changed to "/tmp/a/*", i.e. searching for files within the directory, the return value on Digital Unix is still GLOB_NOMATCH, but on RHEL it is GLOB_ABORTED (2)
Which is correct? (I have seen the man page, and some Google matches mentioning earlier Linux bugs, but am still confused!)
Who knows. You didn't post the code for glob().
man glob:
GLOB(3) Linux Programmer's Manual GLOB(3)
NAME
glob, globfree - find pathnames matching a pattern, free memory
from glob()
That is not the code for glob(). I see no mention of Linux in the
C standard. Nor of glob(). Nor of pathnames.
--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com ma**********@th ales-is.com wrote:
>
I am porting from Digital Unix to Linux (RHEL 4), and am seeing a
difference in the return value of glob().
Given a non-existant directory "/tmp/a", and the following line of
code:
result = glob("/tmp/a", GLOB_ERR, NULL, &globInfo);
- result is set to GLOB_NOMATCH on both platforms.
In my earlier reply I didn't notice the cross-post, and neglected
to set follow-ups. Done here.
--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com
On 2007-06-06, CBFalconer wrote:
"Chris F.A. Johnson" wrote:
>On 2007-06-05, CBFalconer wrote:
>>ma**********@th ales-is.com wrote:
....
>>Who knows. You didn't post the code for glob().
man glob:
GLOB(3) Linux Programmer's Manual GLOB(3)
NAME glob, globfree - find pathnames matching a pattern, free memory from glob()
That is not the code for glob(). I see no mention of Linux in the
C standard. Nor of glob(). Nor of pathnames.
This is comp.os.linux.m isc, not comp.lang.c, so that is
irrelevant.
--
Chris F.A. Johnson, author | <http://cfaj.freeshell. org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
"Chris F.A. Johnson" <cf********@gma il.comwrites:
On 2007-06-06, CBFalconer wrote:
[...]
>That is not the code for glob(). I see no mention of Linux in the C standard. Nor of glob(). Nor of pathnames.
This is comp.os.linux.m isc, not comp.lang.c, so that is
irrelevant.
It's both, as well as comp.unix.progr ammer. The message was
(inappropriatel y) cross-posted.
--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
"Chris F.A. Johnson" wrote:
On 2007-06-06, CBFalconer wrote:
>"Chris F.A. Johnson" wrote:
>>On 2007-06-05, CBFalconer wrote: ma**********@th ales-is.com wrote:
...
>>>Who knows. You didn't post the code for glob().
man glob:
GLOB(3) Linux Programmer's Manual
NAME glob, globfree - find pathnames matching a pattern, free memory from glob()
That is not the code for glob(). I see no mention of Linux in the C standard. Nor of glob(). Nor of pathnames.
This is comp.os.linux.m isc, not comp.lang.c, so that is irrelevant.
No, if you look at the cross-posts you will see it is also c.l.c.
Follow-ups have been set.
--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ralawrence |
last post by:
Hi there,
Funny question this, but the server my website is on is currently
undergoing changes/updates and for a short period of time the version
of PHP has gone back to 4.2.2.
This means that "glob" doesn't work (as i'm told it was introduced in
4.3.0) and so some of the pages on my website are breaking.
Rather than wait for it to be...
|
by: Python Dunce |
last post by:
I've run into an issue with glob and matching filenames with brackets ''
in them. The problem comes when I'm using part of such a filename as the
path I'm passing to glob. Here's a trimmed down dumb example. Let's say I
have a directory with the following files in it.
foo.par2
foo.vol0+1.par2
foo.vol1+1.par2
zzz .par2
zzz .vol0+1.par2
|
by: Tony |
last post by:
Hello All,
I'm having difficulty in using the glob function with stat.
Here is a simple piece of code –
-----------------------------------------------------------
#! /usr/bin/perl -w
use File::Glob;
use File::stat;
|
by: lemke_juergen |
last post by:
Hi everyone,
I define some vars and functions in a "support" module which gets
called from my
main app module. Using Python 2.5.
I import all symbols in the support module at the top of the main
module through:
from support import *
|
by: Neil Webster |
last post by:
Hi,
I was wondering whether anybody could help me out.
I have a program, for part of it I am trying to pass a variable to a
glob function, this returns an empty list. The strange thing is when
I hard code in the variable the glob section works.
Does anybody have any ideas as why it is not working?
| |
by: Adam |
last post by:
Hello,
I have a small app I am creating to crawl a directory and check that
if it is moved to another a location it's path will not break a
character limit. Usually the Windows path limit.
Now the script is working but every time I want to scan again I have
to restart for the log files to be written. I want to just be able to
change the...
|
by: jo3c |
last post by:
hi everyone happy new year!
im a newbie to python
i have a question
by using linecache and glob
how do i read a specific line from a file in a batch and then insert
it into database?
because it doesn't work! i can't use glob wildcard with linecache
|
by: dieter |
last post by:
Hi,
Overview
=======
I'm doing some simple file manipulation work and the process gets
"Killed" everytime I run it. No traceback, no segfault... just the
word "Killed" in the bash shell and the process ends. The first few
batch runs would only succeed with one or two files being processed
(out of 60) before the process was "Killed". Now...
|
by: John [H2O] |
last post by:
I have a glob.glob search:
searchstring = os.path.join('path'+'EN*')
files = glob.glob(searchstring)
for f in files:
print f
___
This returns some files:
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |