Closed Mte90 closed 2 years ago
I see this on verbose:
gcc -std=c99 -Wall -Wextra -pedantic /home/mte90/Desktop/Prog/GameShell/gameshell/missions/processes/03_pstree_kill/process.c -o /home/mte90/Desktop/Prog/GameShell/gameshell/.tmp/demone_malizioso
/home/mte90/Desktop/Prog/GameShell/gameshell/missions/processes/03_pstree_kill/spell.c:30: error: unterminated #else
30 | #ifndef GSH_NO_GETTEXT
|
/home/mte90/Desktop/Prog/GameShell/gameshell/missions/processes/03_pstree_kill/spell.c:30: error: unterminated #else
30 | #ifndef GSH_NO_GETTEXT
|
GSH: sourcing $GSH_ROOT/missions/processes/03_pstree_kill/deps.sh
GSH: environment modifications while sourcing $GSH_ROOT/missions/processes/03_pstree_kill/deps.sh
+Function:_mission_init
+Process: 284700 sleep
GSH: environment modifications while sourcing $GSH_ROOT/missions/processes/03_pstree_kill/init.sh
There is any update for this?
No, sorry. I remember dealing with truncated lines at some point, but I have yet to check where, and how.
OK, I think I understand what happens.
ps
and pstree
truncate the process name to 15 characters.
"demone_malizioso" is thus 1 character too long! ("mischievous_imp" was exactly 15 characters long, so I never saw the problem.)
Asking for the commandline (with ps -f
) rather than the process name gives the full path to the executable and it is not truncated.
I don't like that solution because
ps
sh
pstree
: some come from the imp
directory, and some come from the fairy
directory`.The easiest fix would be to replace demone_malizioso
by a process name that is less than 15 characters!
A better fix would be to design another mission to illustrate processes hierarchy, but I'm not going to do that anytime soon.
What do you think?
I see, the problem in my case is that malizioso
has all the synonyms in italian of the same length...
I should change the word with something similar like rogue/rascal but I think that is not the same thing.
Here seems that is possible to get the whole process name with ps
https://askubuntu.com/questions/717919/how-to-prevent-ps-from-truncating-the-process-name
Otherwise a solution is to look for a process that start with that string.
Here seems that is possible to get the whole process name with
ps
https://askubuntu.com/questions/717919/how-to-prevent-ps-from-truncating-the-process-nameNot really, that's the equivalent to using
ps -f
, which I really don't like.Otherwise a solution is to look for a process that start with that string.
Ahah... Does dc688dcb, on your branch, work with you?
Tested with the latest changes on my branch is still failing:
Hai ucciso il demone?
Spiacente, ma la missione 29 non é stata completata.
/home/mte90/Desktop/Prog/GameShell/gameshell/missions/processes/03_pstree_kill/clean.sh: riga 5: 252385 Ucciso "$GSH_TMP/$(gettext "nice_fairy")"
Killed
Crap, it seems to work with me. Do you have commit dc688dcb?
Do gsh test
and gsh auto
fail too? (from the repository)
It is working, it was my fault that I didn't generated a new archive.
Perfect! Let's keep this in your branch.
https://github.com/phyver/GameShell/blob/master/missions/processes/03_pstree_kill/init.sh#L57