Final Exam Preparation Flashcards

1
Q

$ ( sleep 10; echo “red wire”) & (sleep 10;echo “blue wire”) &
[1] 17510
[2] 17511

$ ./autopilot.sh

How do you get autopilot.sh to run in the background and prevent “blue wire” from displaying on the terminal.

A

Autopilot.sh starts in the foreground.

So need to “CRTL+Z”
- suspends the process and is no asleep

Then “bg”
- sends it to the background

then kill 17511
- when using kill cmd, its “kill” and the job number

bg or bg 3
kill %2 or kill 17511

kill -9 is not required . Normal kill will allow the process to clean up after itself. But kill -9 is an immediate kill

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

init is usually the grandparent of most processes

A

the parent of init PID 1 is the kernel PID 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

when running make, an error will NOT be generated if default target is not set

A

default is to run the first RULE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In a Makefile, actions can be unix commands

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In a makfile, if a dependency is older than the target, then the actions in that rule will NOT be performed

A

only if dependency is younger than target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Level classes : constants to specify the important level of log messages ad to control which log records to report

OFF
severe
warning
info
config
fine
finer
finest
ALL
A

properties .config to change logging functionality without recompiling code

Even if not “logged”, log messages are still constructed even though its not shown,

Logging creates more runtime cost

creating a guarded logger can lower the runtime cost

control variable can be initialized using final keyword to have statements compiled out of program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

HIERARCHY
root
attributes
elements

A

element is defined by having an open tag and closed tag

article should be unique and has a unique atttribute/entry. has unique “key”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Project Organization

build.xml file is high level

src folder (.java etc)
bin folder (.class files) : compiled binaries
A

ANT build files are written in XML: convention is to vall file build.xml

Each build file contains:
A project
at least 1 target

Targets are composed of some number of tasks

Build files may also contain properties (i.e. marcos)

comments are with blocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Project Tag is used to define the projec you wish to work with

Project tags contain 3 attributes
name: logical name for the project
default: the default target to execute
basedir : base directory for which all operations are done relative to

A

A description for the project can be specified from within the project tag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Properties

Similar to macros in a make file

name is how we refer to something in the build file

location is referring to the directory structure
can call location or value

reference is ${ }

A

can define elements in one line

including /> will open and close statement in the same line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Targets

Target tag is similar to target in Make file

Depends: similar to dependencies and dependency chains

desscription: description of waht the target does

A

above can be run by typing

ANT init

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

ANT is advanced build tool for java

A

properties : defining a maco or local variable

what are action tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly