Messages
Ordered list of dispatched messages across all your buses
"App\Message\ActivityPub\Inbox\ActivityMessage" |
|
---|---|
Caller | In SharedInboxController.php line |
Bus | messenger.bus.default |
Message | App\Message\ActivityPub\Inbox\ActivityMessage {#353 +payload: "{"@context":["https://join-lemmy.org/context.json","https://www.w3.org/ns/activitystreams"],"actor":"https://lemmy.ml/c/linux","to":["https://www.w3.org/ns/activitystreams#Public"],"object":{"id":"https://beehaw.org/activities/create/df26c487-714a-445a-850d-fa50bb067065","actor":"https://beehaw.org/u/AndrasKrigare","@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1",{"lemmy":"https://join-lemmy.org/ns#","litepub":"http://litepub.social/ns#","pt":"https://joinpeertube.org/ns#","sc":"http://schema.org/","ChatMessage":"litepub:ChatMessage","commentsEnabled":"pt:commentsEnabled","sensitive":"as:sensitive","matrixUserId":"lemmy:matrixUserId","postingRestrictedToMods":"lemmy:postingRestrictedToMods","removeData":"lemmy:removeData","stickied":"lemmy:stickied","moderators":{"@type":"@id","@id":"lemmy:moderators"},"expires":"as:endTime","distinguished":"lemmy:distinguished","language":"sc:inLanguage","identifier":"sc:identifier"}],"to":["https://www.w3.org/ns/activitystreams#Public"],"object":{"type":"Note","id":"https://beehaw.org/comment/4539264","attributedTo":"https://beehaw.org/u/AndrasKrigare","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://lemmy.ml/c/linux","https://lemmy.wtf/u/mina86"],"content":"<p>To me, the potential point of confusion is referring to “sent by Ctrl+D” and things “received by the end process” as synonymous, ignoring the tty driver in between. When you Ctrl+d, you send a magic byte value to the tty master (which I would refer to as a EOF character, but I understand the argument against the terminology). On the other side of it the process doesn’t receive this value, but instead has its read call returned even if the buffer is 0.</p>\n<p>A simple example hopefully highlighting the difference</p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">Window1:\n</span><span style=\"color:#323232;\">nc -nvlp 5555 #"far nc"\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">Window2:\n</span><span style=\"color:#323232;\">nc -nv 127.0.0.1 5555 #"local NC"\n</span><span style=\"color:#323232;\">Hi there[Enter]\n</span><span style=\"color:#323232;\">Hi [Ctrl+D]There[Ctrl+D][Enter]\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">Window3:\n</span><span style=\"color:#323232;\">strace -p [pid of local nc]\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">Window2:\n</span><span style=\"color:#323232;\">[Right arrow][Right arrow][Ctrl+D]\n</span><span style=\"color:#323232;\">[Ctrl+D]Uh oh[Enter]\n</span></pre>\n<p>What we see is pretty much as described. From the first line, we see “Hi there\\n” on the other side. For the second line, we first see "Hi " appear, then “There” then “\\n”.</p>\n<p>From the third line, in the strace we can see the sequences representing the right-arrow key, and we can see the tty driver on the far side takes those sequences and interprets them to render the cursor two characters to the right.</p>\n<p>The fourth line is where it gets more interesting. We send the tty driver the EOF byte, and the tty driver interprets this and gives the current active tty client a 0-byte return to read() and assumes we have no more data to send. But unlike bash, nc doesn’t care about a 0-byte read and is still looking for more data (as we can see in the strace). But if we continue to type and send more data (the “Uh oh”), we can see in the strace that the tty never sends this to the nc. So, to some definition, we’re still sending data to the local nc, but the tty driver isn’t actually relaying it</p>\n","inReplyTo":"https://lemmy.wtf/comment/13648129","mediaType":"text/html","source":{"content":"To me, the potential point of confusion is referring to \"sent by Ctrl+D\" and things \"received by the end process\" as synonymous, ignoring the tty driver in between. When you Ctrl+d, you send a magic byte value to the tty master (which I would refer to as a EOF character, but I understand the argument against the terminology). On the other side of it the process doesn't receive this value, but instead has its read call returned even if the buffer is 0.\n\nA simple example hopefully highlighting the difference \n\n```\nWindow1:\nnc -nvlp 5555 #\"far nc\"\n\nWindow2:\nnc -nv 127.0.0.1 5555 #\"local NC\"\nHi there[Enter]\nHi [Ctrl+D]There[Ctrl+D][Enter]\n\nWindow3:\nstrace -p [pid of local nc]\n\nWindow2:\n[Right arrow][Right arrow][Ctrl+D]\n[Ctrl+D]Uh oh[Enter]\n```\n\nWhat we see is pretty much as described. From the first line, we see \"Hi there\\n\" on the other side. For the second line, we first see \"Hi \" appear, then \"There\" then \"\\n\". \n\nFrom the third line, in the strace we can see the sequences representing the right-arrow key, and we can see the tty driver on the far side takes those sequences and interprets them to render the cursor two characters to the right.\n\nThe fourth line is where it gets more interesting. We send the tty driver the EOF byte, and the tty driver interprets this and gives the current active tty client a 0-byte return to read() and assumes we have no more data to send. But unlike bash, nc doesn't care about a 0-byte read and is still looking for more data (as we can see in the strace). But if we continue to type and send more data (the \"Uh oh\"), we can see in the strace that the tty never sends this to the nc. So, to some definition, we're still sending data to the local nc, but the tty driver isn't actually relaying it","mediaType":"text/markdown"},"published":"2025-03-30T12:50:39.093174+00:00","tag":[{"href":"https://lemmy.wtf/u/mina86","name":"@mina86@lemmy.wtf","type":"Mention"}],"distinguished":false,"audience":"https://lemmy.ml/c/linux"},"cc":["https://lemmy.ml/c/linux","https://lemmy.wtf/u/mina86"],"tag":[{"href":"https://lemmy.wtf/u/mina86","name":"@mina86@lemmy.wtf","type":"Mention"}],"type":"Create","audience":"https://lemmy.ml/c/linux"},"cc":["https://lemmy.ml/c/linux/followers"],"type":"Announce","id":"https://lemmy.ml/activities/announce/create/23544320-9bdf-4edc-9d97-25a9727942c7"}" +request: [ "host" => "kbin.spritesserver.nl" "method" => "POST" "uri" => "/f/inbox" "client_ip" => "54.36.178.108" ] +headers: [ "content-type" => [ "application/activity+json" ] "host" => [ "kbin.spritesserver.nl" ] "date" => [ "Sun, 30 Mar 2025 12:50:46 GMT" ] "digest" => [ "SHA-256=JzqnvVWcqlMXPSgn0WUC1KbZoY63vUbh9kRtsmuu838=" ] "signature" => [ "keyId="https://lemmy.ml/c/linux#main-key",algorithm="hs2019",headers="(request-target) content-type date digest host",signature="F2u0l4pCoMdslw5a9IEhs1v4cx9OFJ7AOUPYzC7V7sWkzpjCWdSJd/CpCOgrgysXDnD4sK5fFVsqIhDO7vrQNsvXN+AcXF8M0ACte+H28ziUd3w+QNnmpIi4yXm+TKN6MwZr1Y2VVucaLZWEuueljvJY4ixweaKioLr1B6npuHqXuT9uVX+UAedYiUumSWPrn+qW9j5ElyDoLpuJaA3Gc2rL1Bmz6TzoNolwPFRHyPYx92scdgQ5M8zYgfUZF8YngAbX1SJESY0vV9HZlEoPwNRW1vDjjRrsqHpwH0TVYv9N1YKQpt0p/yyj7VL06cFd4ocXrQwwQn1HOQaSX84UGg=="" ] "accept" => [ "*/*" ] "user-agent" => [ "Lemmy/0.19.10; +https://lemmy.ml" ] "accept-encoding" => [ "gzip" ] "content-length" => [ "6180" ] "x-php-ob-level" => [ "1" ] ] } |
Envelope stamps when dispatching | No items |
Envelope stamps after dispatch |
Symfony\Component\Messenger\Stamp\BusNameStamp {#343 -busName: "messenger.bus.default" } Symfony\Component\Messenger\Stamp\SentStamp {#268 -senderClass: "Symfony\Component\Messenger\Bridge\Doctrine\Transport\DoctrineTransport" -senderAlias: "async_ap" } Symfony\Component\Messenger\Stamp\TransportMessageIdStamp {#227 -id: "52757951" } |