Linux C: Changing process name during compilation -


so trying change name of process of c program crystal_capture crystal_captured, seems wanting keep old process name (crystal_capture) .

here makefile.

cc=gcc cflags=-c -wall msflags=-lpcap -i/usr/include/mysql -dbig_joins=1  -fno-strict-aliasing  -g -l/usr/lib/arm-linux-gnueabihf -lmysqlclient -lpthread -lz -lm -lrt -ldl capture=crystal_captured  all: $(capture)  $(capture): parser.o $(capture).o      $(cc) $(msflags) parser.o $(capture).o -o $@  $(capture).o: $(capture).cpp     $(cc) $(cflags) $(msflags) $(capture).cpp  parser.o: parser.c     $(cc) $(cflags) parser.c  clean:     rm -rf *.o $(capture) 

commands make; sudo ./crystal_captured; ps -a | grep crystal

seeing crystal_capture

so there anyway can change process name compiling, without having go code.

after debugging , figure out. wasn't doing wrong truncating 'd' added onto name.

it must truncate 15 chars max.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -