You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "John Storta Jr. (JIRA)" <ji...@apache.org> on 2010/01/01 00:42:29 UTC
[jira] Created: (DERBY-4500) CLASSPATH scripts should not exit on
error
CLASSPATH scripts should not exit on error
------------------------------------------
Key: DERBY-4500
URL: https://issues.apache.org/jira/browse/DERBY-4500
Project: Derby
Issue Type: Bug
Components: Demos/Scripts
Affects Versions: 10.5.3.0
Environment: Unix platforms.
Reporter: John Storta Jr.
Priority: Minor
This applies to the following
setEmbeddedCP
setNetworkServerCP
setNetworkClientCP
Bug DERBY-4283 references this issue, but only with regard to the setEmbeddedCP script. That bug also indicates the issue was resolved in 10.5.2, but I am looking at 10.5.3 and I still see the exit command in the script.
The proper way to use these CLASSPATH scripts is to source them rather than run them.
. $DERBY_HOME/bin/setNetworkServerCP
Doing so will run the script in the current shell. If the scripts issue an exit upon encountering an error, then the users shell will exit as well.
This is the relevant section of the scripts
if [ -z "$DERBY_HOME" ] ; then
echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
echo "to the location of your Derby installation."
exit 1 #<<<<This will exit the users shell if the script is sourced
fi
The scripts should generate a message if DERBY_HOME is not set, but should not issue an exit command.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-4500) CLASSPATH scripts should not exit on
error
Posted by "John Storta Jr. (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Storta Jr. updated DERBY-4500:
-----------------------------------
Issue & fix info: [Known fix]
The simple fix for this would be to change the exit command to a return command. This will return the script to the user's shell with the indicated return code, but will not exit the shell itself.
Here is the relevant code.
if [ -z "$DERBY_HOME" ] ; then
echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
echo "to the location of your Derby installation."
return 1 #This will return a code of '1' to the users shell without exiting the shell
fi
> CLASSPATH scripts should not exit on error
> ------------------------------------------
>
> Key: DERBY-4500
> URL: https://issues.apache.org/jira/browse/DERBY-4500
> Project: Derby
> Issue Type: Bug
> Components: Demos/Scripts
> Affects Versions: 10.5.3.0
> Environment: Unix platforms.
> Reporter: John Storta Jr.
> Priority: Minor
>
> This applies to the following
> setEmbeddedCP
> setNetworkServerCP
> setNetworkClientCP
> Bug DERBY-4283 references this issue, but only with regard to the setEmbeddedCP script. That bug also indicates the issue was resolved in 10.5.2, but I am looking at 10.5.3 and I still see the exit command in the script.
> The proper way to use these CLASSPATH scripts is to source them rather than run them.
> . $DERBY_HOME/bin/setNetworkServerCP
> Doing so will run the script in the current shell. If the scripts issue an exit upon encountering an error, then the users shell will exit as well.
> This is the relevant section of the scripts
> if [ -z "$DERBY_HOME" ] ; then
> echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
> echo "to the location of your Derby installation."
> exit 1 #<<<<This will exit the users shell if the script is sourced
> fi
> The scripts should generate a message if DERBY_HOME is not set, but should not issue an exit command.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-4500) CLASSPATH scripts should not exit on
error
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Pendleton updated DERBY-4500:
-----------------------------------
Attachment: patch.diff
Attached 'patch.diff' extends the change made by DERBY-4283
to setNetworkClientCP and setNetworkServerCP
> CLASSPATH scripts should not exit on error
> ------------------------------------------
>
> Key: DERBY-4500
> URL: https://issues.apache.org/jira/browse/DERBY-4500
> Project: Derby
> Issue Type: Bug
> Components: Demos/Scripts
> Affects Versions: 10.5.3.0
> Environment: Unix platforms.
> Reporter: John Storta Jr.
> Assignee: Bryan Pendleton
> Priority: Minor
> Attachments: patch.diff
>
>
> This applies to the following
> setEmbeddedCP
> setNetworkServerCP
> setNetworkClientCP
> Bug DERBY-4283 references this issue, but only with regard to the setEmbeddedCP script. That bug also indicates the issue was resolved in 10.5.2, but I am looking at 10.5.3 and I still see the exit command in the script.
> The proper way to use these CLASSPATH scripts is to source them rather than run them.
> . $DERBY_HOME/bin/setNetworkServerCP
> Doing so will run the script in the current shell. If the scripts issue an exit upon encountering an error, then the users shell will exit as well.
> This is the relevant section of the scripts
> if [ -z "$DERBY_HOME" ] ; then
> echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
> echo "to the location of your Derby installation."
> exit 1 #<<<<This will exit the users shell if the script is sourced
> fi
> The scripts should generate a message if DERBY_HOME is not set, but should not issue an exit command.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-4500) CLASSPATH scripts should not exit on
error
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Pendleton resolved DERBY-4500.
------------------------------------
Resolution: Fixed
Fix Version/s: 10.6.0.0
Thanks for tracking this down, John. I've made the corresponding changes
and committed them to the Derby trunk as subversion revision 895666.
> CLASSPATH scripts should not exit on error
> ------------------------------------------
>
> Key: DERBY-4500
> URL: https://issues.apache.org/jira/browse/DERBY-4500
> Project: Derby
> Issue Type: Bug
> Components: Demos/Scripts
> Affects Versions: 10.5.3.0
> Environment: Unix platforms.
> Reporter: John Storta Jr.
> Assignee: Bryan Pendleton
> Priority: Minor
> Fix For: 10.6.0.0
>
> Attachments: patch.diff
>
>
> This applies to the following
> setEmbeddedCP
> setNetworkServerCP
> setNetworkClientCP
> Bug DERBY-4283 references this issue, but only with regard to the setEmbeddedCP script. That bug also indicates the issue was resolved in 10.5.2, but I am looking at 10.5.3 and I still see the exit command in the script.
> The proper way to use these CLASSPATH scripts is to source them rather than run them.
> . $DERBY_HOME/bin/setNetworkServerCP
> Doing so will run the script in the current shell. If the scripts issue an exit upon encountering an error, then the users shell will exit as well.
> This is the relevant section of the scripts
> if [ -z "$DERBY_HOME" ] ; then
> echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
> echo "to the location of your Derby installation."
> exit 1 #<<<<This will exit the users shell if the script is sourced
> fi
> The scripts should generate a message if DERBY_HOME is not set, but should not issue an exit command.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (DERBY-4500) CLASSPATH scripts should not exit on
error
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Pendleton reassigned DERBY-4500:
--------------------------------------
Assignee: Bryan Pendleton
> CLASSPATH scripts should not exit on error
> ------------------------------------------
>
> Key: DERBY-4500
> URL: https://issues.apache.org/jira/browse/DERBY-4500
> Project: Derby
> Issue Type: Bug
> Components: Demos/Scripts
> Affects Versions: 10.5.3.0
> Environment: Unix platforms.
> Reporter: John Storta Jr.
> Assignee: Bryan Pendleton
> Priority: Minor
>
> This applies to the following
> setEmbeddedCP
> setNetworkServerCP
> setNetworkClientCP
> Bug DERBY-4283 references this issue, but only with regard to the setEmbeddedCP script. That bug also indicates the issue was resolved in 10.5.2, but I am looking at 10.5.3 and I still see the exit command in the script.
> The proper way to use these CLASSPATH scripts is to source them rather than run them.
> . $DERBY_HOME/bin/setNetworkServerCP
> Doing so will run the script in the current shell. If the scripts issue an exit upon encountering an error, then the users shell will exit as well.
> This is the relevant section of the scripts
> if [ -z "$DERBY_HOME" ] ; then
> echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
> echo "to the location of your Derby installation."
> exit 1 #<<<<This will exit the users shell if the script is sourced
> fi
> The scripts should generate a message if DERBY_HOME is not set, but should not issue an exit command.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.