Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

unix - Controlling terminal & a new session -


how can process (in case session leader) controlling terminal?

what in program:

1. fork; 2. parent -> while(1) or smth. similar; 3. child  -> setsid();              exec "man ps"; 

i beleived nothing in output. (child session leader , therefore has no relation old tty) got , don't understand why. man ouputs. not interactive. when press ctrl-z becomes interactive when press 'q' quites , returnes prog(parent). questions are:

  1. please explain happens @ beginning (why have press ctrl-z, read above)
  2. why man output in shell?
  3. how can man without tty connected (i checked ps, man , pager have "?" in tty column)
  4. and finally: how can new session leader acquire controlling terminal. there wayes besides open(/dev/tty) ?

q. 1. 3.: child process keep access stdin, stdout etc., after setsid(). need close them explicitly (or reopen using eg. open("/dev/null",o_rdwr);).

q 4.:

when session-leader without controlling-terminal opens terminal-device-file , flag o_noctty clear on open, terminal becomes controlling-terminal assigned session-leader if terminal not assigned session

http://uw714doc.sco.com/en/sdk_sysprog/_the_controlling-terminal_and_pr.html


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -