Segmentation (CoreDump) error !!


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Segmentation (CoreDump) error !!
# 1  
Old 04-16-2008
Segmentation (CoreDump) error !!

Hi all,

I am trying to create few directories using script and its giving me segmentation error.

Code:
#!/bin/ksh

createDirectories()

createDirectories()
{
        cat dirs | \
        while read line
        do
                mkdir "/clocal/mqbrkrs/user/mqsiadm/varun/ClientSecurity/$line", 0777
        done
}

and file "dirs" contains the name of the directories to be created.

Please suggest !

Thanks
Varun GuptaSmilie
# 2  
Old 04-16-2008
Put this after the function declaration
Code:
createDirectories

Instead of before it.
# 3  
Old 04-16-2008
Quote:
Originally Posted by varungupta
Hi all,

I am trying to create few directories using script and its giving me segmentation error.

Code:
#!/bin/ksh

createDirectories()

createDirectories()
{
        cat dirs | \
        while read line
        do
                mkdir "/clocal/mqbrkrs/user/mqsiadm/varun/ClientSecurity/$line", 0777
        done
}

and file "dirs" contains the name of the directories to be created.

Please suggest !

Thanks
Varun GuptaSmilie
what is the intention of ', 0777' on the 'mkdir' call?
# 4  
Old 04-16-2008
Quote:
Originally Posted by jim mcnamara
Put this after the function declaration
Code:
createDirectories

Instead of before it.
Hey Jim,

That won't change the result.
In that case too, i am getting the same error !!
# 5  
Old 04-16-2008
Quote:
Originally Posted by vgersh99
what is the intention of ', 0777' on the 'mkdir' call?
Hey,

Intension to give 0777 is to assign the permissions to the newly created directories.
Even i have tried without this, it gives the same error. As follows:
mkdir "/clocal/mqbrkrs/user/mqsiadm/varun/ClientSecurity/$line"
# 6  
Old 04-16-2008
If you run it with ksh -x scriptname, do you see anything useful?

Segfault sounds vaguely like infinite loop, but it could be something else too, of course.

(Maybe iit gives you a lead to help you solve it yourself. If you do want to post something here, try to trim it down to just a representative part.)
# 7  
Old 04-16-2008
Quote:
Originally Posted by era
If you run it with ksh -x scriptname, do you see anything useful?

Segfault sounds vaguely like infinite loop, but it could be something else too, of course.

(Maybe iit gives you a lead to help you solve it yourself. If you do want to post something here, try to trim it down to just a representative part.)
Even using "ksh -x dir_script" it gives the same error without tracking details. it gives the segmentation fault(coredump) in the next line when i try to execute the above command.
Something is strange here !!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Why segmentation(coredump) in the following code in C?

hi I have a method which returns char*. In this method am using switch case. I am getting segmentation error in case 49 and my code is case 49: if(intFlag == 0210) { iiIDCode = atoi(getsubstring(sReq,262,2)); l =... (7 Replies)
Discussion started by: AAKhan
7 Replies

2. AIX

Error: Memory fault(coredump)

Hi Experts, While running a command, i saw this error below # ls -lrt total 74008 -rw-r--r-- 1 rr57104 edcfes 37889134 May 16 12:41 LGTOnw.clnt.7.4.2.0.bff.tar.gz drwxr-xr-x 2 root system 256 May 18 12:42 lost+found # gunzip LGTOnw.clnt.7.4.2.0.bff.tar.gz Memory fault(coredump) ... (2 Replies)
Discussion started by: EngnrRG
2 Replies

3. HP-UX

Need help on Bus error(coredump)

Hi all, I am quite weak in C but I need to get some work done. Hope someone can help me out. I keep getting this error when i try to run my C application in my HP-UX 10.20 machine. Some code snippet: Month(DBTime) =====This is a function which will return variable "CutOffTime" to be use... (5 Replies)
Discussion started by: Vision©
5 Replies

4. Shell Programming and Scripting

Segmentation Fault(coredump)

I'm getting this error when trying to run a Acucobol program thru UNIX.. Segmentation Fault(coredump) Precompiler error prevents compilation of xxxxxx.co. Please help me in this case.. (1 Reply)
Discussion started by: Manish4
1 Replies

5. UNIX for Dummies Questions & Answers

bus error (coredump)

Hi all, I am getting bus error problem in SunOS. Can you please help me out in this regard. Actually, my entire code till the last line has been executed. But after tht i am getting a bus error. Please help me. Thanks in advance. Charu. (4 Replies)
Discussion started by: charu
4 Replies

6. Solaris

lpstat gives segmentation coredump error

hi everyone, we have solaris 8 in sun v480 server. it gives this error. Segmentation Fault(coredump) can anyone help me in this - urgently. Regards Karthik C (8 Replies)
Discussion started by: cksriramchandra
8 Replies

7. AIX

Segmentation fault(coredump)

Hi All Can anybody help me? When ever am trying to run topas system gives me an error Segmentation fault(coredump) does anybody ahve solution for this? (4 Replies)
Discussion started by: vjm
4 Replies

8. HP-UX

SSL key give coredump error!!

Hi there, After setup my apache server, I have using mkcert.sh file to generate a SSL key. But when I tried to start my apache server it is prompted me to enter the pass phrase password, in fact I had entered the same correct password which I provided during the key generation and it give me the... (0 Replies)
Discussion started by: e_jeffhang
0 Replies

9. UNIX for Advanced & Expert Users

Bus Error(coredump)

Hi, I am using HP-UX. While i try to run the Sqlplus command using the shel script in encounter the following error: <shell script name>: some number Bus Error(coredump) What may be the reason behind this. I read few previous threads in this forum where i found some similar case. There it was... (2 Replies)
Discussion started by: Jayesh
2 Replies

10. UNIX for Dummies Questions & Answers

Bus error(coredump

aix 5.3 ML1 system was functioing well, when suddenly telnet session hung and then I got the following message "Bus error(coredump)" would appreciate if anyone would assist as to what to do next. (3 Replies)
Discussion started by: Student37
3 Replies
Login or Register to Ask a Question