[prog] Solution

Sachin sachinr at vsnl.in
Fri Jan 31 23:54:28 EST 2003


Dear friends,

                                                        I came across your
group while I was searching for some solution in segmentation problem.I am
now currently working in a small project in Linux.Attached with this mail is
a small program which I had modularised.I just want you to tell me whether
my approach of modularisation(separating header files and C source code,
:--)  ) is correct.In one of your mailing archives I've found people
discussing about this topic ,but no such style is given as example.The
details of the functions need not bother you and you may take it as a black
box which does some work(actually it is a socket program where I wrote
function for server to create a socket and bind to the port and address,the
one mentioned comm.h is just a header file which contains all commonly
declared header files).

                                                            Also,beyond the
message "segmentation fault" ,I am not able to glean much information
regarding the status of the program.I've also found that compiling
with -Wall option saves a lot of headache,but I still get the problem even
when the program contains no dynamically allocated memory(which is
considered a main source of Segmentation fault).Can anyone elaborate what
are the potential bugs  for the  generation of segmentation fault.



Sachin.R.Athreya
-------------- next part --------------
z'µìmjÛZržžÜ²Ç+¹¶ÞtÖ¦zÊ
‘ësŠ”ò¥æ©¦XœjبŸüsŠ—(ššÞ²ÇJ,ÞÛNyo+^°7¬rz-jö¢•¦åyJå†Ûiÿùbžì\†,h®銗«™¨¥þšè‚¶¦š)àý«miÈfz{lÿm4ßMw×þµy×·ãßì¡É
µ¸§


More information about the Programming mailing list