Taking this from memory
There is a hose going between the intake manifold and the petcock
when the engine is running there is a Under pressure that moves a rubber membrane opening for the fuel
without that pressure it is closed or should be.
https://www.z1enterprises.com/petcock-repair-kit-xs650-1978.html
I have had a couple of interesting faults on that . One night I was supposed to go Home.
10 pm ish
Machine started I Got to the city limits ( small town ) machine started misfiring and eventually stopped.
No tools No flashlight. No Knowledge
Pushed it to a transformer station .. Pitch black more or less .. Scratching my head Kicking nothing happened..
A car comes up offering help ..Nice .. but it was one of the Towns leading Roughs .
Street Fighter top 5 .. Which I had seen in action at Bars and Discos many times Picking fights and Hitting people.
As sensation seeking
Dangerous
I suppose you know the type.
with two brothers equally big.(They were not there )
I Thought oh no ..On top of this I am getting my ass Whopped here tonight.
But no problems he was sober .. No Sports activities there in the dark.
He could not much about this ..offered a lift which I declined .. And he left.
After a while gas had leaked past that defect membrane -- Helmet on Thinking now I ride home
believing some electrical fault. Which i Had many of at that time.
2 miles further out in the dark stopped again.
This time i parked and walked back to where I came from was allowed to crash on the sofa
Call the boss next morning I wont be there today in time.
Taking the buss and later return with toolbox That hose had come off that should open for the fuel-- dont ask me How.
Another time the hose was cracked drawing in extra air making it misfire