Safari is running according to the Dock (icon has dot below it, and right-click shows "Force Quit"); however Activity Monitor doesn't show it and
ps -ef | grep -i saf returns nothing. Relaunching the Dock does nothing. Safari won't open a window, nor will it quit.
Is there anything I can do to repair this short of restarting?
I ran into a problem with Safari. It froze. So I tried Force Quit.
It seemed to work (blue dot below Dock icon disappeared). I clicked the icon to restart Safari. It bounced. A couple minutes later, I noticed it still bouncing. I right clicked and Force Quit again.
I clicked Safari and nothing happened. The blue dot did not appear below the icon. I right clicked and saw a "Force Quit" option — even though Safari was not running, and there was no blue dot.
I relaunched the Dock. (Using TinkerTool's button for that purpose.) The blue dot reappeared under the Safari icon, but clicking the icon didn't accomplish anything. Right clicking still showed a "Force Quit" option.
I checked the process table and found four processes running with "Safari" in the command name:
$ ps -ef | grep Safari 501 1275 1 0 25Dec17 ?? 4:53.91 /System/Library/PrivateFrameworks/SafariSafeBrowsing.framework/com.apple.Safari.SafeBrowsing.Service 501 68080 1 0 3Jan18 ?? 0:00.98 /System/Library/PrivateFrameworks/SafariServices.framework/Versions/A/XPCServices/com.apple.SafariServices.xpc/Contents/MacOS/com.apple.SafariServices 501 75536 1 0 4Jan18 ?? 0:04.11 /System/Library/PrivateFrameworks/SafariShared.framework/Versions/A/XPCServices/com.apple.Safari.History.xpc/Contents/MacOS/com.apple.Safari.History 501 84790 1 0 8Feb18 ?? 0:00.24 /System/Library/PrivateFrameworks/SafariServices.framework/Versions/A/XPCServices/com.apple.SafariServices.xpc/Contents/MacOS/com.apple.SafariServices 501 56333 360 0 7:51PM ttys000 0:00.01 grep Safari
After some more icon clicking, Force Quit-ing and Dock relaunching, I opened Activity Monitor. I found Safari didn't show in Activity Monitor when view was set to "windowed processes." I set the view to "all processes" and searched for "saf" and found the same four processes above. I force quit them with Activity Monitor.
The blue dot remained under the Safari icon on the Dock. The "Force Quit" option still appears on right-clicking the icon. Relaunching the Dock doesn't change this. Clicking on the Safari dock icon doesn't cause it to bounce, nor does anything matching "safari" (case insensitive) appear in the process table.
How do I make the Dock aware that the Safari application is not running? How can I kill Safari when it's already dead (and not even a zombie process)? How can I get Safari to start up again?
I'm running Mac OS 10.11.6 and Safari 10.0.
Update: Opening '/Applications/Safari.app/Contents/MacOS/Safari' directly works, but it makes a NEW Dock icon that behaves normally. The old one is still there. So, looks like the problem is with a stale Dock icon. How can I fix that?