- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Coredump in kornshell but not in possix?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 03:12 AM
11-24-2000 03:12 AM
I noticed something weird in the kornshell, the attached script will generate a memory fault (SIGSEGV) when executed using /usr/bin/ksh but when the first line is changed to #!/usr/bin/sh it will run without any problems! Does anyone have a clue what's going on? (Seems like a bug to me ...)
Greetz, Danny
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 03:44 AM
11-24-2000 03:44 AM
Re: Coredump in kornshell but not in possix?
What OS do you have ? Patches ?
Can you also supply the stderr output seeing as you included set -x in the script. It would be good to see exactly where the SIGSEGV is occurring.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 04:18 AM
11-24-2000 04:18 AM
Re: Coredump in kornshell but not in possix?
Here's some more info (attachment), although i did include the set -x there is no debug output?
I ran the original on a 10.10 system, i've tried on 10.20 as well and i get the same error.
Greetz, Danny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 04:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 04:40 AM
11-24-2000 04:40 AM
Re: Coredump in kornshell but not in possix?
Thanks! Danny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 05:01 AM
11-24-2000 05:01 AM
Re: Coredump in kornshell but not in possix?
Your problem is you are making too shifts ( more than arguments).
insert echo $# $* before shift and run.
See man getopts:
thera are an example that use shift out of loop and ussing $OPTIND.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 05:31 AM
11-24-2000 05:31 AM
Re: Coredump in kornshell but not in possix?
If i read the manual correctly getopts should only walk through the "legal options" i.e. all options with either a preceding - or + sign. But it seems the implementation in the kornshell walks through the other options as well?
Danny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 05:49 AM
11-24-2000 05:49 AM
Re: Coredump in kornshell but not in possix?
I understand that getopts may search over all args to find all options.
For your script perhaps you will prefer:
DiffTime -h -s time -e time
and getopt hs:e:.
See man 3c getopt too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2000 07:32 AM
11-24-2000 07:32 AM
Re: Coredump in kornshell but not in possix?
Check with this command "swlist -l fileset|grep sh" to see if you have patch PHKL_19762 installed on your server.
The patch is a fix for debugging shared lib gets SIGSEGV problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2000 02:20 PM
11-25-2000 02:20 PM
Re: Coredump in kornshell but not in possix?
sh -x myscript arg1 arg2 > /var/tmp/tracefile 2>&1
Bill Hassell, sysadmin