FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS Docs

 
 
LinkBack Thread Tools
 
Old 09-10-2012, 07:52 PM
R P Herrold
 
Default strange error noise ...

The 'prepare' script uses a somewhat unusual construct a few
places that has permissions errors, leaking (harmless) noise
to stderr

/home/artwork/artwork/trunk/Scripts/Bash/Functions/Commons/
cli_printMessage.sh: line 70: /dev/stderr: Permission denied

echo "$MESSAGE" > /dev/stderr


/home/artwork/artwork/trunk/Scripts/Bash/Functions/Commons/
cli_printMessage.sh: line 237: /dev/stderr: Permission denied

END {}' > /dev/stderr

--------------------

and I see a third instance in that script:

[artwork@centos-art-58 ~]$ grep stderr
/home/artwork/artwork/trunk/Scripts/Bash/Functions/Commons/cli_printMessage.sh
echo "$MESSAGE" > /dev/stderr
cli_printMessage "${CLI_NAME} (${ORIGIN}):
$MESSAGE" --as-stderr-line
echo -e -n "$MESSAGE" > /dev/stderr
--as-stderr-line )
END {}' > /dev/stderr
[artwork@centos-art-58 ~]$


Might this properly simply be sent to /dev/null ?

-- Russ herrold
_______________________________________________
CentOS-docs mailing list
CentOS-docs@centos.org
http://lists.centos.org/mailman/listinfo/centos-docs
 
Old 09-13-2012, 11:11 PM
Alain Reguera Delgado
 
Default strange error noise ...

On 09/10/2012 03:52 PM, R P Herrold wrote:
>
> The 'prepare' script uses a somewhat unusual construct a few
> places that has permissions errors, leaking (harmless) noise
> to stderr
>
> /home/artwork/artwork/trunk/Scripts/Bash/Functions/Commons/
> cli_printMessage.sh: line 70: /dev/stderr: Permission denied
>
> echo "$MESSAGE"> /dev/stderr
>
>
> /home/artwork/artwork/trunk/Scripts/Bash/Functions/Commons/
> cli_printMessage.sh: line 237: /dev/stderr: Permission denied
>
> END {}'> /dev/stderr
>
> --------------------

Yes. These are error messages. Where else does they should go to but the
standard error output? Isn't it the usual way of printing error messages?

For some reason are you running the whole script through `sudo'?

> Might this properly simply be sent to /dev/null ?

We could do send error messages to /dev/null but centos-art.sh script is
using /dev/stderr to report error messages. For example, when a file
doesn't have execution right centos-art.sh script prints an error
message telling you that, so you can fix the problem. If we don't do
such printing finding errors would be even harder, don't you think?

--
Alain Reguera Delgado <alain.reguera@gmail.com>
_______________________________________________
CentOS-docs mailing list
CentOS-docs@centos.org
http://lists.centos.org/mailman/listinfo/centos-docs
 
Old 09-18-2012, 09:26 PM
R P Herrold
 
Default strange error noise ...

On Thu, 13 Sep 2012, Alain Reguera Delgado wrote:

>> echo "$MESSAGE"> /dev/stderr

> Yes. These are error messages. Where else does they should go to but the
> standard error output? Isn't it the usual way of printing error messages?

no:
echo "$MESSAGE" 1>&2

is the usual way, so that it follows the stderr file handle
assigned to that sub-shell, rather than (as here in your
approach) trying to write directly to a device to which it
does not have rights

> For some reason are you running the whole script through
`sudo'?

no -- I 'su -' 'd down to an end user account from root to run
the script. No console login on that box

> message telling you that, so you can fix the problem. If we don't do
> such printing finding errors would be even harder, don't you think?

I am not against error logging, but the unusual way it is
attempted, in view of the Unix and CentOS rights model as to
selected devices

-- Russ herrold
_______________________________________________
CentOS-docs mailing list
CentOS-docs@centos.org
http://lists.centos.org/mailman/listinfo/centos-docs
 
Old 09-19-2012, 04:43 PM
Alain Reguera Delgado
 
Default strange error noise ...

On 09/18/2012 05:26 PM, R P Herrold wrote:
> echo "$MESSAGE" 1>&2
>
> is the usual way, so that it follows the stderr file handle
> assigned to that sub-shell, rather than (as here in your
> approach) trying to write directly to a device to which it
> does not have rights

Russ, it is evident I was confused about it. Now I understand why it
wasn't possible to run the script through su without all those
permission denied messages.

I will update the script to fix this, based on your suggestion, and will
commit the changes up to the central repository soon.

Thank you,

--
Alain Reguera Delgado <alain.reguera@gmail.com>
_______________________________________________
CentOS-docs mailing list
CentOS-docs@centos.org
http://lists.centos.org/mailman/listinfo/centos-docs
 

Thread Tools




All times are GMT. The time now is 03:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org