Sponsored Content
Top Forums Programming C. To segmentation fault or not to segmentation fault, that is the question. Post 303032574 by Corona688 on Wednesday 20th of March 2019 12:48:32 PM
Old 03-20-2019
Don't be embarassed! C is very different from most languages. It's a high-level language which writes pure assembly, with all the safety you get from pure assembly...
 

10 More Discussions You Might Find Interesting

1. Programming

segmentation fault

sometimes for this code i get a segmentation fault for codes llike this : int main{ int * a= 0; int b; a = (int*)malloc(sizeof(int)); ///some code using these variable but no freeing of a if(a){ free(a); a = 0; } return... (3 Replies)
Discussion started by: wojtyla
3 Replies

2. AIX

Segmentation fault

Hi , During execution a backup binary i get following error "Program error 11 (Segmentation fault), saving core file in '/usr/datatools" Riyaz (2 Replies)
Discussion started by: rshaikh
2 Replies

3. Linux

Segmentation fault

Hi, on a linux Red HAT(with Oracle DB 9.2.0.7) I have following error : RMAN> delete obsolete; RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 2 using channel ORA_DISK_1 Segmentation fault What does it mean ? And the solution ? Many thanks. (0 Replies)
Discussion started by: big123456
0 Replies

4. Programming

segmentation fault

If I do this. Assume struct life { char *nolife; } struct life **life; // malloc initialization & everything if(life->nolife == 0) Would I get error at life->nolife if it is equal to 0. wrong accession? (3 Replies)
Discussion started by: joey
3 Replies

5. Programming

Segmentation fault.

I'm getting a segmentation fault. I'm new to Linux programming. Thanks so much for all of your input.:eek: #include </usr/include/mysql++/mysql++.h> #include <stdio.h> #include <iostream> #include <sstream> #include <string.h> using namespace std; int outputToImport(const char*... (1 Reply)
Discussion started by: sepoto
1 Replies

6. Programming

Segmentation fault in C

i have this code int already_there(char *client_names, char *username) { int i; for(i = 0; i<NUM; i++) { printf("HERE\n"); if (strcmp(client_names, username)==0) return(1); } return(0); } and i get a segmentation fault, whats wrong here? (7 Replies)
Discussion started by: omega666
7 Replies

7. UNIX for Advanced & Expert Users

segmentation fault with ps

What does this mean and why is this happening? $ ps -ef | grep ocular Segmentation fault (core dumped) $ ps -ef | grep ocular Segmentation fault (core dumped) $ ps aux | grep ocular Segmentation fault (core dumped) $ ps Segmentation fault (core dumped) $ pkill okular $ ps... (1 Reply)
Discussion started by: cokedude
1 Replies

8. Programming

Using gdb, ignore beginning segmentation fault until reproduce environment segmentation fault

I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this : i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
Discussion started by: pooyair
6 Replies

9. Homework & Coursework Questions

Segmentation Fault

this is a network programming code to run a rock paper scissors in a client and server. I completed it and it was working without any error. After I added the findWinner function to the server code it starts giving me segmentation fault. -the segmentation fault is fixed Current problem -Also... (3 Replies)
Discussion started by: femchi
3 Replies

10. Solaris

Segmentation fault

Hi Guys, I just installed and booted a zone called testzone. When I logged in remotely and tried changing to root user I get this error: "Segmentation fault" Can someone please help me resolve this? Thanks alot (2 Replies)
Discussion started by: cjashu
2 Replies
FTWHICH(1)						      General Commands Manual							FTWHICH(1)

NAME
ftwhich - fault tolerant search for a command name SYNOPSIS
ftwhich [-#hIp][-t#] program_name DESCRIPTION
ftwhich is a fault tolerant version of the which(1) command. ftwhich searches for a given program in all directories included in your PATH environment variable and reports all files with a name that approximately matches the given program_name. ftwhich achieves fault tolerance by calculating the so called Weighted Levenshtein Distance. The Levenshtein Distance is defined as the minimum number of character insertions, deletions and replacements that transform a string A into a string B. ftwhich is similar to the which command with the following differences: - ftwhich is by default NOT case sensitive - ftwhich is fault tolerant - Some shells have a build in which command that will also search aliases. ftwhich can naturally not search for aliases as it does not know about alias definitions. - ftwhich lists all files that approximately match. The files first shown take preference over files of the same name printed later as they are from directories listed earlier in the PATH. - The level of fault tolerance can be adjusted by specifying the optional parameter tolerance. A tolerance of 0 specifies exact match. OPTIONS
-h Prints help/usage information. -I Do case sensitive search (default is case in-sensitive) -p print the actual distance value in front of the found filename. This value is equal to the number of insertions, deletions and replacements necessary to transform the name of the found program into the search key. -# or -t# Set the fault tolerance level to #. The fault tolerance level is an integer in the range 0-255. It specifies the maximum number of errors permitted in finding the approximate match. The default tolerance is (strlen(searchpattern) - number of wildcards)/6 + 1 program_name The program file to search for. '*' and '?' can be used as wildcards. '?' denotes one single character. '*' denotes an arbitrary number of characters. The last argument to ftwhich is not parsed for options as the program needs at least one program_name argument. This means that ftwhich -x will not complain about a wrong option but search for the program named -x. EXAMPLE
Search for all programs like gcc in your PATH: ftwhich gcc This will e.g. find gcc or cc or CC ... To find all files that start with any prefix and end in config and differ in 2 letters from the word config: ftwhich -2 '*config' To find all files that exactly start with the prefix if: ftwhich -0 'if*' To find all clock programs: ftwhich -0 '*clock*' BUGS
The wildcards '?' and '*' can not be escaped. These characters function always as wildcards. This is however not a big problem since there is normally hardly any command that has these characters in its name. AUTHOR
Guido Socher (guido@linuxfocus.org) SEE ALSO
whichman(1), ftff(1) Search utilities January 1999 FTWHICH(1)
All times are GMT -4. The time now is 11:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy