{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1743526366,
"reponame":"libwebsockets",
"desc":"libwebsockets lightweight C networking library",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"f047743da7ff397f63e9bbb54bd13e3f",
"oid":{ "oid": "98f63c6c8de4a2bf287a37cf12ff34c721b9f359", "alias": []},"blobname": "scripts/ctest-background-kill.sh", "blob": "#!/bin/bash\n#\n# $SAI_INSTANCE_IDX - which instance of sai, 0+\n# $1 - background fixture name, unique within test space, like \u0022multipostlocalsrv\u0022\n# $2 - executable\n# $3+ - args\n\necho \u0022$0 $1 $2 $3 $4\u0022 \u003e\u003e /tmp/ctklog\n\nJ\u003d`basename $2`.$1.$SAI_INSTANCE_IDX\nPI\u003d`cat /tmp/sai-ctest-$J`\necho \u0022Stage 1 kill $J 'kill $PI'\u0022 \u003e\u003e /tmp/ctklog\n\n#\n# We expect our background process to still be around\n#\n\nset +e\nset +E\nkill -0 $PI 2\u003e\u00261 \u003e\u003e /tmp/ctklog\nGONESKI\u003d$?\n\nif [ $GONESKI -eq 0 ] ; then\n\tkill $PI 2\u003e\u00261 \u003e\u003e /tmp/ctklog\n\tkill -9 $PI 2\u003e\u00261 \u003e\u003e /tmp/ctklog\n\n\tkill -0 $PI 2\u003e\u00261\n\tif [ $? -eq 0 ] ; then\n\t\t#\n\t\t# but in case it isn't enough, use ps to find the same executable started on the same port\n\t\t# and kill that\n\t\t#\n\t\tA1\u003d$3\n\t\tif [ -z \u0022$A1\u0022 ] ; then\n\t\t\tA1\u003d$2\n\t\tfi\n\t\tA2\u003d$4\n\t\tif [ -z \u0022$A2\u0022 ] ; then\n\t\t\tA2\u003d$2\n\t\tfi\n\n\t\t# sed is there to match up bsd/osx ps with linux\n\t\tKL\u003d`ps -Af | grep -v ctest-background-kill | grep -v grep | grep $2 | grep $A1 | grep $A2 | tr -s ' ' | sed \u0022s/^\u005c //g\u0022 | cut -d' ' -f2`\n\t\tif [ ! -z \u0022$KL\u0022 ] ; then\n\t\t\techo \u0022Stage 2 kill $J 'kill $KL'\u0022 \u003e\u003e /tmp/ctklog\n\t\t\tkill $KL 2\u003e\u00261 \u003e\u003e /tmp/ctklog\n\t\tfi\n\tfi\nelse\n\techo \u0022Process already dead\u0022 \u003e\u003e /tmp/ctklog\nfi\n\nexit $GONESKI\n\n","s":{"c":1743526366,"u": 265}}
],"g": 1540,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 1, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}